Skip to content

Commit f0c5996

Browse files
authored
Merge pull request #8 from daljitsharma/patch-1
Addressing security hub finding S3.5
2 parents c84f738 + 2e2e70f commit f0c5996

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

template.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,22 @@ Resources:
2626
ServerSideEncryptionConfiguration:
2727
- ServerSideEncryptionByDefault:
2828
SSEAlgorithm: AES256
29+
LambdaZipsBucketPolicy:
30+
Type: AWS::S3::BucketPolicy
31+
Properties:
32+
Bucket:
33+
Ref: LambdaZipsBucket
34+
PolicyDocument:
35+
Statement:
36+
- Effect: Deny
37+
Action: "s3:*"
38+
Principal: "*"
39+
Resource:
40+
- !Sub 'arn:aws:s3:::${LambdaZipsBucket}'
41+
- !Sub 'arn:aws:s3:::${LambdaZipsBucket}/*'
42+
Condition:
43+
Bool:
44+
aws:SecureTransport: false
2945

3046
ProducerLambda:
3147
Type: AWS::Lambda::Function

0 commit comments

Comments
 (0)