Skip to content

Commit 8ad34dc

Browse files
author
Fuss Florian (uid10804)
committed
fix(template): restrict lambdas permissions on s3 bucket
1 parent 55826dc commit 8ad34dc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/template/serverless.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,15 @@ provider:
4545
iamRoleStatements:
4646
- Effect: 'Allow'
4747
Action:
48-
- 's3:*'
49-
Resource: '*'
48+
- 's3:GetObject'
49+
- 's3:PutObject'
50+
Resource:
51+
- 'arn:aws:s3:::${self:custom.file.s3Bucket}/*'
5052
- Effect: 'Allow'
5153
Action:
52-
- 's3:*'
54+
- 's3:ListBucket'
5355
Resource:
54-
- 'arn:aws:s3:::${self:custom.file.s3Bucket}/*'
56+
- 'arn:aws:s3:::${self:custom.file.s3Bucket}'
5557

5658
# The `functions` block defines what code to deploy
5759
functions:

0 commit comments

Comments
 (0)