The construct creates a certificate, s3 bucket and cloudfront distribution. The cloudfront distribution uses origin access identity security; it does not use the static website configuration.
If isSinglePageApplication is true then the cloudfront distribution creates error handling for 404 and 403 to redirect to the SPA.
A hosted zone needs to be created before, so that the IAM certificate can automatically create the cnames to validate it.
The first domain name in the array is the one used as the domain name and the rest as alternate domain names.
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testsnpm run bootstrap
should be the first thing to run, only has to be done oncenpm run liststacks
alias to remember whats the command in cdk to list all the stacksnpm run deploysimplewebsite
deploy the simple website stacknpx cdk deploy
deploy this stack to your default AWS account/regionnpx cdk diff
compare deployed stack with current statenpx cdk synth
emits the synthesized CloudFormation template