Skip to content

AHaydar/static-site-s3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

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

About

Host a static website on Amazon S3 using AWS CDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published