Skip to content

BrusR/spa-s3-hosting-cdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

spa-s3-hosting-cdk

Cdk initialization

In this tutorial, it is assumed that you have a succesfull installation of the CDK and the AWS CLI tools. Moreover you should have access to an AWS account and have already set your credentials.

You create a new AWS CDK project by invoking "cdk init" in an empty directory. In this case the language I've chosen was python.

mkdir cdk
cd cdk
cdk init app --language python

Activate the virtual environment if not already activated.

source .venv/bin/activate

Then install the requirements.

python -m pip install -r requirements.txt

Bootstrap the CDK project just the first time. This creates the necessary resources to deploy a CDK application.

cdk bootstrap

To list all available cdk stacks to deploy.

cdk list

To synthesize the application and get cloudformation output files.

cdk synthesize

To deploy to the cloud (this will deploy both the code and the cloud resources)

cdk deploy

Cloud arquitecture

The cdk project deploys a single page application without a backend.The main AWS services it uses are S3 to store the files, Cloudfront to distribute the files and Cloudformation to build the stack.

alt text

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages