This is a template to configure your own CDN, hosted on AWS.
- Replace values in
./config.ts
and./cdk.context.json
by 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 required
this happens when calling thesynth
command while the optionnewStyleStackSynthesis
is NOT false, see aws/aws-cdk#17942- To avoid misleading errors, I've disabled
newStyleStackSynthesis
so that you don't run into this when runningyarn synth
for 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 build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testscdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template