静的サイトホスティングのためのインフラ(S3 + CloudFront)を構築するCDKのサンプルです。
cdk deploy
を実行することで、インフラの構築から静的ファイルをS3 Bucketにdeployするところまで自動実行します。
独自ドメインを使いたい場合、Route53で別途DNSの設定を行う必要があります。
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