This is a sample CDK application for CloudFront continuous deployment using CodePipeline. CloudFront continuous deployment consists of Step Functions.
First, define the context as follows:
{
...
"context": {
...
"owner": "user",
"addresses": ["user@your-domain.jp"],
"serviceName": "cfcd-test",
"repositoryName": "test-repo",
"branch": "main",
"hostedZoneName": "your-domain.com",
"buildspecDir": "scripts/build",
}
}
Next, place the version of the application front end in the SSM parameter store as follows:
$ aws ssm put-parameter --name "/<serviceName>/version/frontend" --value "v1" --type String --overwrite
{
"Version": 1,
"Tier": "Standard"
}
The following command launches a sample pipeline for continuous deployment consisting of a CloudFront distribution, hosting buckets, and Step Functions.
cdk synth
cdk deploy --all