feat(cloudfront): CloudFront Function runtime property#28099
feat(cloudfront): CloudFront Function runtime property#28099mergify[bot] merged 26 commits intoaws:mainfrom
Conversation
aws-cdk-automation
left a comment
There was a problem hiding this comment.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.
|
Sorry, I think it's failing to push the snapshot. |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
This reverts commit 757a212.
Pull request has been modified.
| const cfFunctionRequest = new cloudfront.Function(stack, 'FunctionRequest', { | ||
| code: cloudfront.FunctionCode.fromInline('function handler(event) { return event.request }'), | ||
| }); | ||
|
|
||
| const cfFunctionResponse = new cloudfront.Function(stack, 'FunctionResponse', { | ||
| code: cloudfront.FunctionCode.fromInline('function handler(event) { return event.response }'), | ||
| }); |
There was a problem hiding this comment.
In my opinion, it would be better to use a new parameter FunctionRuntime.JS_2_0 as well, what do you think?
There was a problem hiding this comment.
Sorry, It seems that @mikewrighton previously approved. See this comment if you need me to, otherwise I just approve.
There was a problem hiding this comment.
What you say is true. I am happy to report that I have changed to a meaningful integ test
Pull request has been modified.
Pull request has been modified.
| /** | ||
| * The Runtime of the function. | ||
| */ | ||
| readonly functionRuntime: string; |
There was a problem hiding this comment.
| readonly functionRuntime: string; | |
| readonly functionRuntime?: string; |
Build is failing with:
err - IFACE aws-cdk-lib.aws_cloudfront.FunctionAttributes: newly required property 'functionRuntime' added: input to aws-cdk-lib.aws_cloudfront.Function.fromFunctionAttributes [strengthened:aws-cdk-lib.aws_cloudfront.FunctionAttributes]
Looks like we cannot require this prop to fromFunctionAttributes and instead will have to default to the original runtime, or throw an error if not provided.
There was a problem hiding this comment.
@kaizencc
We decided to make it an arbitrary property. If not specified, the Default value, runtime1.0, is specified as before.
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
fixed aws#28163 This provides an option to change the runtime for CloudFront Functions. This makes it easier to access the CloudFront KeyValueStore. https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-function-functionconfig.html ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
#28099 added this file erroneously. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
#28099 added this file erroneously. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
fixed #28163
This provides an option to change the runtime for CloudFront Functions. This makes it easier to access the CloudFront KeyValueStore.
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-function-functionconfig.html
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license