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.
- 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
cd infrastructure & npm install
Use the infrastructure folder as an example to define AWS resources (S3 in this case)
For more details check the following blog post
Ali Haydar – @YourTwitter