Repository navigation
fix: replace deprecated S3Origin and Provider logRetention - #283
Merged
Merged
Conversation
S3Origin is deprecated in favour of S3BucketOrigin. Use S3BucketOrigin.withOriginAccessIdentity so existing deployments keep their OAI and bucket policy unchanged; moving to OAC in place can drop CloudFront's bucket access while the policy propagates, so that's left for a major release. The revalidation Provider's logRetention is replaced with an explicit one day LogGroup. Fixes #269
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reopen of #281 (auto-closed when its base branch was deleted). Clears the deprecation warnings from #269.
S3Origin->S3BucketOrigin.withOriginAccessIdentity. Kept OAI instead of moving to OAC because the CDK docs are explicit that switching an existing distribution from OAI to OAC in one deploy can cause CloudFront to lose bucket access while the policy propagates (bucket policies are eventually consistent). Same OAI and bucket policy as before, so no template change for existing stacks beyond the origin class. OAC as the default is a candidate for v5.overrides.s3OriginPropsis now generated fromS3BucketOriginWithOAIPropsinstead of the deprecatedS3OriginProps. Same fields, only the doc strings differ.The revalidation
Providergets an explicit one dayLogGroupinstead oflogRetention. Existing stacks will get a new log group; the old auto-created/aws/lambda/...group is left in place.Fixes #269