Skip to content

Commit

Permalink
try fix BucketPolicy deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
its-felix committed May 4, 2024
1 parent fede4c4 commit 324a50e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cdk/lib/constructs/ui-resources-construct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class UIResourcesConstruct extends Construct {
sid: 'AllowCloudFrontServicePrincipalGet',
effect: Effect.ALLOW,
actions: ['s3:GetObject'],
principals: [new ServicePrincipal('cloudfront')],
principals: [new ServicePrincipal('cloudfront.amazonaws.com')],
resources: [this.bucket.arnForObjects('*')],
conditions: { StringEquals: { 'AWS:SourceArn': distributionArn } },
}));
Expand All @@ -47,7 +47,7 @@ export class UIResourcesConstruct extends Construct {
sid: 'AllowCloudFrontServicePrincipalList',
effect: Effect.ALLOW,
actions: ['s3:ListBucket'],
principals: [new ServicePrincipal('cloudfront')],
principals: [new ServicePrincipal('cloudfront.amazonaws.com')],
resources: [this.bucket.bucketArn],
conditions: { StringEquals: { 'AWS:SourceArn': distributionArn } },
}));
Expand Down

0 comments on commit 324a50e

Please sign in to comment.