Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 1.24 KB

README.md

File metadata and controls

44 lines (32 loc) · 1.24 KB

Single Page Application (SPA) Cloud Architecture

Single Page Application Cloud Architecture

Overview

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.

Pre-requisites

  1. Register a new domain name with AWS Route 53
  2. Request an ACM Certificate associated with your Route 53 domain name
  3. Create CNAME records for the ACM Certificate through ACM Certificate AWS console
  4. Install and configure the AWS CLI
  5. Install and bootstrap the CDK CLI

NOTE: Requesting an ACM SSL/TLS Certificate can take around 30 minutes or more

Exporting environment variables

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'

Deploying the infrastructure

Verify all there are no errors

cdk synth 

Deploy CDK infrastructure

cdk deploy 

Delete infrastructure

cdk destroy