Add these env variables:
AWS_ACCOUNT
: aws account idAWS_REGION
: region to deployDOMAIN
: domain
Requires a hosted zone for your domain: DOMAIN
- create a hosted zone
- point domain name servers to hosted zone name servers
npm install -g aws-cdk
run cdk deploy
Stack deploys the following resources:
- ACM certificate
- Route53 Record
- certificate attached
- VPC - Following resources deployed in the VPC
- 2 availability zones: 2 subnets
- Application Load Balancer
- unsecure listener - redirects to HTTPS
- certificate attached to secure listener
- DynamoDb Table
- RDS Database Instance
- S3 Bucket
- Elasticache Redis Cluster
- Websocket Servers
- cluster
- task: 1 container
- service
- Dashboard Api Servers
- cluster
- task: 2 containers
- service
- Custom AWS Resource to initialize RDS schema
- task: only run once during cdk deployment
- cleanup lambda functio to remove server ip from dynamo table in event of task failure
To remove all infrastructure: cdk destroy