This cloud infrastructure is centered around four major components: Route 53 for DNS management, CloudFront to serve static assets, AWS Certificate Manager for TLS/SSL certificates, and Simple Storage Service (S3) to store these assets.
- Register a new domain name with AWS Route 53
- Request an ACM Certificate associated with your Route 53 domain name
- Create CNAME records for the ACM Certificate through ACM Certificate AWS console
- Install and configure the AWS CLI
- Install and bootstrap the CDK CLI
NOTE: Requesting an ACM SSL/TLS Certificate can take around 30 minutes or more
Create an .env
file and add the following environment variables listed in the .env.example
file:
DOMAIN_NAME='example.com'
SUBDOMAIN='www'
ROUTE_53_HOSTED_ZONE_ID='example.com hosted zone id'
CERTIFICATE_ARN='ACM certificate ARN for example.com'
Verify all there are no errors
cdk synth
Deploy CDK infrastructure
cdk deploy
Delete infrastructure
cdk destroy