Test custom response header with using Lambda@Edge, CloudFront and S3..
git clone https://github.com/msysh/aws-sample-cdk-custom-response-header-with-lambdaedge.git
cd aws-sample-cdk-custom-response-header-with-lambdaedge
npm install
oryarn install
cdk bootstrap
, if you've never execute yet.cdk deploy
Add files you want for AWS Lambda, into assets
.
Default status of distribution is set false
.
- Lambda function name :
functionName
incdk.json
. Default iscf-edge-custom-response-header
. - IAM role name :
roleName
incdk.json
. Default iscf-edge-custom-response-header
. - S3 bucket name :
bucketName
incdk.json
. Default isorigin-bucket-for-custom-response-header
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