Small addition to your invalidation handling: you can invalidate the CloudFront cache by using the S3 deployment construct if you connect the CloudFront distribution to it. See the example here. The distributionPaths is the magic property to invalidate the cache.
Small addition to your invalidation handling: you can invalidate the CloudFront cache by using the S3 deployment construct if you connect the CloudFront distribution to it. See the example here. The
distributionPaths
is the magic property to invalidate the cache.Good point.
I left it out because I wanted to avoid circular references, but yes, if you have the distribution at hand, you can invalidate it right away.