Skip to content

hollanddd/second-rate.website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Second Rate Website

A breakable toy for experimenting with React and AWS CDK

Directory Structure

deployments - AWS CDK TypeScript project resources website/build - default build directory for CDK S3 deployment

Runtime

  • node12 & npm

Deployments

  • @aws-cdk - Infrastructure
  • @aws-sdk - Hit counter update command & Lambda Invoke

Website

The deployment is designed to sync the contents of website/build and expects to find an index.html that acts as the root of the website. A slightly modified create-react-app is included for displaying the hit count.

Set Up

The guide assumes that you have an AWS account and have properly configured permissions for deploying resources using the AWS CDK.

Install deployment dependencies and build Lambda functions:

cd deployments && npm install && npm run build

Install website dependencies and build React application:

cd websites && npm isntall && npm run build

Deploy AWS Resources

cdk deploy MyStack                      \\
  --parameters DomainName=something.com \\
  --parameters HostedZoneId=somezone    \\

Certificate provisioning will take some time to complete. If provisioning fails the deployment will clean itself up thanks to AWS CDK.

TODO

  • use actions for website deployments
  • use pipelines for deployments

About

AWS CDK serverless single page application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published