aws-cdk-examples
aws-cdk-examples copied to clipboard
Remove deprecated cloudfront_origins.S3Origin from static site example
trafficstars
Describe the bug
The static site example utilizes
origin: new cloudfront_origins.S3Origin(siteBucket, {originAccessIdentity: cloudfrontOAI}),
even though S3Origin is labeled as deprecated: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront_origins.S3Origin.html
Expected Behavior
The example uses S3BucketOrigin or S3StaticWebsiteOrigin instead.
Current Behavior
Using the example triggers a deprecation warning.
Reproduction Steps
Checkout https://github.com/aws-samples/aws-cdk-examples/blob/main/typescript/static-site/static-site.ts and install latest deps.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.161.1
Framework Version
No response
Node.js Version
20.11.1
OS
macOS 14.6.1
Language
Typescript
Language Version
No response