https://github.com/sergiopichardo/spa-architecture
Single Page Application (SPA) Cloud Infrastructure
https://github.com/sergiopichardo/spa-architecture
acm-certificate aws-cdk cloudfront cloudfront-functions s3
Last synced: 5 months ago
JSON representation
Single Page Application (SPA) Cloud Infrastructure
- Host: GitHub
- URL: https://github.com/sergiopichardo/spa-architecture
- Owner: sergiopichardo
- Created: 2023-10-03T00:27:11.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-16T00:28:35.000Z (over 2 years ago)
- Last Synced: 2025-07-18T13:47:57.435Z (11 months ago)
- Topics: acm-certificate, aws-cdk, cloudfront, cloudfront-functions, s3
- Language: HTML
- Homepage: https://sergiopichardo.com/projects/spa-infra-on-aws
- Size: 355 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Single Page Application (SPA) 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:
```sh
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
```sh
cdk synth
```
Deploy CDK infrastructure
```sh
cdk deploy
```
Delete infrastructure
```sh
cdk destroy
```