Skip to content

stevensblueprint/lume_construct

Repository files navigation

Lume CDK Template

This template code provisions a Cloudformation stack that deploys a Lume site to S3 and Cloudfront. It uses the AWS CDK to define the infrastructure as code in TypeScript.

This template will provision the following resources:

  • An S3 bucket to store the Lume site files
  • A CloudFront distribution to serve the Lume site
  • A Route 53 record set to point a custom domain to the CloudFront distribution

The cdk.json file tells the CDK Toolkit how to execute your app.

Prequisites

  • AWS CLI installed and configured with your AWS credentials (with a profile for Blueprint account)
  • AWS CDK installed
  • Node.js & npm installed
  • A public Route 53 Hosted Zone created in your AWS account for the domain you want to use (e.g. example.com)
  • An SSL/TLS certificate created in AWS Certificate Manager (ACM) for the domain you want to use (e.g. example.com). The certificate must be in the same region as the CloudFront distribution (e.g. us-east-1).

Getting Started and Deploying the Stack

  1. Make a Fork of this Repository
    Create a fork of this repository to your own GitHub account. This is because your configuration file could contain sensitive information regarding your project/AWS account.

  2. Install Dependencies
    Run the following command to install the required dependencies:
    npm install

  3. Configure the Stack
    Fill out the config/config.yaml file with the relevant development and production information.

  4. Synthesize the Stack
    Before deploying, you can synthesize the stack to ensure it is valid:
    cdk synth

  5. Deploy the Stack
    Deploy the stack to your AWS account and region:
    cdk deploy --profile <aws_profile>

Useful commands

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests
  • npx cdk deploy deploy this stack to your default AWS account/region
  • npx cdk diff compare deployed stack with current state
  • npx cdk synth emits the synthesized CloudFormation template

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •