Custom Resource CloudFront Invalidation In C# #985
Labels
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
Describe the feature
This example uses an AwsCustomResource to produce an invalidation on an Amazon CloudFront Distribution. A CloudFront Invalidation wipes away the cached content so that new changes in the distribution's origin can be seen immediately.
The
AwsCustomResource
CDK construct is an L3 Construct that can be used to create an AWS CloudFormation Custom Resource without having to directly create the AWS Lambda Function to support it.An
AwsCustomResource
is appropriate to use when you have exactly one AWS SDK call to make per stack task:onCreate
,onUpdate
, andonDelete
.Use Case
When a stack with a CloudFront Distribution and an S3 Origin wants to clear the cache every time changes are deployed to the origin.
Proposed Solution
The package is an example of this being done, but it also contains an abstracted helper class that can be dropped in to existing stacks and used for any use case.
Other Information
No response
Acknowledgements
Language
.NET
The text was updated successfully, but these errors were encountered: