AWS CDK tool for deploying SPA to S3
1.2K
Instructions with CDK script for deploying single-page-app to S3. After executing manual steps from section prerequisities you can run the CDK script. The script will create
Make sure you have installed node.js, AWS CDK and Typescript:
# node
nvm install
# aws cdk
npm install -g aws-cdk
# typescript
npm install -g typescript
You need AWS Account. Create IAM user and AWS Access keys via console if you don't have one already.
Create a public hosted zone to AWS Route53 for your domain. If your domain registrar is different from AWS Route53, you need to store the AWS nameservers to your domain settings (via the domain registrar UI).
Declare following environment variables:
# default region for AWS e.g. eu-north-1
export AWS_DEFAULT_REGION=<xxx>
# IAM user access key ID
export AWS_ACCESS_KEY_ID=<xxx>
# IAM user secret access key
export AWS_SECRET_ACCESS_KEY=<xxx>
# default region for AWS e.g. eu-north-1
export CDK_DEFAULT_REGION=<xxx>
# AWS account number
export CDK_DEFAULT_ACCOUNT=<xxx>
# install deps
npm install
# bootstrap CDK
cdk bootstrap
# deploy CDK
cdk deploy
Content type
Image
Digest
Size
134.4 MB
Last updated
almost 6 years ago
docker pull lauravuo/aws-spa