Skip to content

Commit ac77f5f

Browse files
committed
fix: need list permission on web bucket
This is needed so that we know if the deployments log actually do not exist during the initial deployment.
1 parent 458790a commit ac77f5f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/__snapshots__/index.test.ts.snap

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ export class WebappDeploy extends cdk.Construct {
9191
actions: ["s3:GetObject", "s3:PutObject"],
9292
resources: [props.webBucket.arnForObjects("deployments.log")],
9393
}),
94+
new iam.PolicyStatement({
95+
actions: ["s3:List*"],
96+
resources: [props.webBucket.bucketArn],
97+
}),
9498
new iam.PolicyStatement({
9599
actions: ["cloudfront:CreateInvalidation"],
96100
// Cannot be restricted

0 commit comments

Comments
 (0)