Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 1.1 KB

README.md

File metadata and controls

31 lines (19 loc) · 1.1 KB

Host a static website on S3 using AWS CDK

example to use AWS CDK to define an S3 bucket hosting a static website

This is an example demonstrating the usage of AWS CDK to define an S3 bucket and its necessary permissions to host a static website.

Pre-requisites

  • Create an AWS account. If you're new to AWS services and want to explore, I highly recommend setting up a billing alarm so that you don't incur any charges.
  • Install NodeJS and npm -  https://nodejs.org/en/ - npm is installed automatically with NodeJS
  • Install the AWS command line interface
  • Configure AWS client: aws configure; you will be asked for access key ID, secret access key and aws region (details can be found here)
  • Install the AWS CDK globally: npm install -g aws-cdk

Installation

cd infrastructure & npm install

Usage example

Use the infrastructure folder as an example to define AWS resources (S3 in this case)

For more details check the following blog post

Meta

Ali Haydar – @YourTwitter

https://github.com/AHaydar/static-site-s3