-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cloudfront): CloudFront Function runtime property #28099
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What you say is true. I am happy to report that I have changed to a meaningful integ test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Pull request has been modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @watany-dev!
Pull request has been modified.
/** | ||
* The Runtime of the function. | ||
*/ | ||
readonly functionRuntime: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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