(cloudfront-origins): originAccessIdentity not applied for existing bucket #24763
Labels
@aws-cdk/aws-cloudfront-origins
Related to CloudFront Origins for the CDK CloudFront Library
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
Describe the bug
I have a stack where it's using an S3 bucket from another stack via
Bucket.fromBucketName
.I created my own origin access identity and added the bucket policy via:
When creating the distribution, the stack deploys, but the oai is not associated with my origin.
Expected Behavior
The oai should be associated with the origin.
Current Behavior
A new oai instead is being created by
S3Origin
even though I've provided one https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/aws-cloudfront-origins/lib/s3-origin.ts#L60Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.70.0
Framework Version
2.70.0
Node.js Version
v18.12.1
OS
Mac
Language
Typescript
Language Version
4.9.5
Other information
I've already checked issues like #22451 but my bucket is not configured as a website
The text was updated successfully, but these errors were encountered: