-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Closed
Copy link
Labels
@aws-cdk/aws-cloudfrontRelated to Amazon CloudFrontRelated to Amazon CloudFronteffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2
Description
Describe the feature
Enable setting of autoPublish in the L2 construct for CloudFront Function.
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html#cfn-cloudfront-function-autopublish
Use Case
In the current L2 Construct, autoPublish can only be set to true.
It would be helpful to have the ability to set autoPublish to false when deploying L2 Constructs, in order to facilitate testing on the management console before publishing.
Proposed Solution
new cloudfront.Function(this, 'Function', {
code: cloudfront.FunctionCode.fromInline('function handler(event) { return event.request }'),
runtime: cloudfront.FunctionRuntime.JS_2_0,
autoPublish: false // Add
});
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
2.137.0
Environment details (OS name and version, etc.)
irrelevant
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-cloudfrontRelated to Amazon CloudFrontRelated to Amazon CloudFronteffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2