This is a template to configure your own CDN, hosted on AWS.
- Replace values in
./config.tsand./cdk.context.jsonby your own - (optional) Change the AWS profile being used in
./package.json(if you don't want to use the default) - Run
yarn, to install all Node.js dependencies locally - Run
yarn bootstrap, to configure the CDK locally - (optional) Run
yarn synth, to preview the CloudFormation file - Run
yarn deploy, to deploy the CDN stack on AWS
AssertDescription: CDK bootstrap stack version 6 requiredthis happens when calling thesynthcommand while the optionnewStyleStackSynthesisis NOT false, see aws/aws-cdk#17942- To avoid misleading errors, I've disabled
newStyleStackSynthesisso that you don't run into this when runningyarn synthfor the first time, but you should make it true once you've successfully deployed your stack (to see diffs)
- To avoid misleading errors, I've disabled
It uses the following components:
- AWS S3: For storing files in an AWS Bucket
- AWS CloudFront: For applying a CDN on top of the AWS S3 Bucket and using a custom domain for the hosted files
- AWS Route 53: For using a Hosted Zone and a SSL Certificate
Forked from https://github.com/thabo-lebelo/on-demand-videos
ℹ️ "Welcome to your CDK TypeScript project!" original documentation
# Welcome to your CDK TypeScript project!This is a blank project for TypeScript development with CDK.
The cdk.json file tells the CDK Toolkit how to execute your app.
npm run buildcompile typescript to jsnpm run watchwatch for changes and compilenpm run testperform the jest unit testscdk deploydeploy this stack to your default AWS account/regioncdk diffcompare deployed stack with current statecdk synthemits the synthesized CloudFormation template