2 Answers
- Newest
- Most votes
- Most comments
0
I'm closing this for now. I settled on just using the old way first until the CDK catches up.
const oin = new OriginAccessIdentity(stack, 'washnet-cf-origin-access-identity');
sourceBucket.grantRead(oin);
then in the cloudfront config:
s3OriginSource: {
s3BucketSource: source,
originAccessIdentity: oin
},
Good enough for now.
answered a year ago
0
The policy statement syntax is wrong: conditions is not a list. Annoyingly IDEs do not catch this error. Try:
conditions: { StringEquals: { "AWS:SourceArn": `arn:aws:cloudfront::${this.account}:distribution/${distribution.distributionId}` } }
answered 4 months ago
Relevant content
- Accepted Answerasked 8 months ago
- asked 4 months ago
- Accepted Answerasked 8 months ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a month ago