Closed rupe120 closed 1 year ago
Here is a basic repo that demonstrates it https://github.com/rupe120/cdk-cloudfront-test
This is happening because the S3Origin class will use an HttpOrigin if the bucket is configured as a website. Your bucket is configured as a website, so it is going to be using an HttpOrigin which doesn't make use of an OAI. Either you can remove the website configuration from the bucket to let the OAI do the work, or you can move forward with the HttpOrigin option. 🙂
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
The origin access identity is not being applied to the origin when CloudFormation is synth'd
Expected Behavior
The origin access identity is referenced in the origin configuration in CloudFormation.
Current Behavior
The origin access identity is created as a resource but not associated to the origin.
Reproduction Steps
Possible Solution
Looking at the
s3-origin.ts
code I really don't understand why this would be.Additional Information/Context
No response
CDK CLI Version
2.45.0 (build af1fb7c)
Framework Version
No response
Node.js Version
v16.16.0
OS
Windows 10 Pro 19043.1889
Language
Typescript
Language Version
TypeScript 4.8.3
Other information
The template created is below. Search for devoriginaccessidentity86C478E2