aws-samples / aws-cdk-examples

Example projects using the AWS CDK
Apache License 2.0
4.95k stars 2.1k forks source link

Feat(.net):Custom Resource CloudFront Invalidation #986

Closed smguggen closed 4 months ago

smguggen commented 5 months ago

The package added to the csharp section 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, and onDelete.

Fixes #985


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.