@@ -91,11 +91,11 @@ Resources:
91
91
rGuardDutyDeliveryS3BucketPolicy :
92
92
# temp retain for troubleshooting
93
93
DeletionPolicy : Retain
94
- Metadata :
95
- cfn_nag :
96
- rules_to_suppress :
97
- - id : F16
98
- reason : " Opt-in regions may be used and so conditional policy is required"
94
+ # Metadata:
95
+ # cfn_nag:
96
+ # rules_to_suppress:
97
+ # - id: F16
98
+ # reason: "Opt-in regions may be used and so conditional policy is required"
99
99
Type : AWS::S3::BucketPolicy
100
100
Properties :
101
101
Bucket : !Ref rGuardDutyDeliveryS3Bucket
@@ -136,17 +136,17 @@ Resources:
136
136
- guardduty.amazonaws.com
137
137
138
138
# Bucket perm/location check allow for potential opt-in regions
139
- - Sid : AWSBucketPermissionsCheck
139
+ - Sid : AWSBucketPermissionsCheckOptinRegions
140
140
Effect : Allow
141
141
Action :
142
142
- s3:GetBucketAcl
143
143
- s3:GetBucketLocation
144
144
- s3:ListBucket
145
145
Resource : !Sub arn:aws:s3:::${rGuardDutyDeliveryS3Bucket}
146
- Principal : ' * '
147
- Condition :
148
- StringLike :
149
- aws:PrincipalServiceName : guardduty.* .amazonaws.com
146
+ Principal :
147
+ Service :
148
+ - guardduty.ap-southeast-4.amazonaws.com
149
+ - guardduty.ap-east-1 .amazonaws.com
150
150
151
151
- Sid : AWSBucketDelivery
152
152
Effect : Allow
@@ -163,13 +163,14 @@ Resources:
163
163
- Sid : AWSBucketDeliveryOptinRegions
164
164
Effect : Allow
165
165
Action : s3:PutObject
166
+ # Condition:
167
+ # StringEquals:
168
+ # s3:x-amz-acl: bucket-owner-full-control
166
169
Resource : !Sub arn:aws:s3:::${rGuardDutyDeliveryS3Bucket}/*
167
- Principal : ' *'
168
- Condition :
169
- StringLike :
170
- aws:PrincipalServiceName : guardduty.*.amazonaws.com
171
- # StringEquals:
172
- # s3:x-amz-acl: bucket-owner-full-control
170
+ Principal :
171
+ Service :
172
+ - guardduty.ap-southeast-4.amazonaws.com
173
+ - guardduty.ap-east-1.amazonaws.com
173
174
174
175
- Sid : DenyUnencryptedObjectUploads
175
176
Effect : Deny
@@ -186,13 +187,14 @@ Resources:
186
187
- Sid : DenyUnencryptedObjectUploadsOptinRegions
187
188
Effect : Deny
188
189
Action : s3:PutObject
189
- Resource : !Sub arn:aws:s3:::${rGuardDutyDeliveryS3Bucket}/*
190
- Principal : ' *'
191
190
Condition :
192
- StringLike :
193
- aws:PrincipalServiceName : guardduty.*.amazonaws.com
194
- # StringNotEquals:
195
- # s3:x-amz-server-side-encryption: aws:kms
191
+ StringNotEquals :
192
+ s3:x-amz-server-side-encryption : aws:kms
193
+ Resource : !Sub arn:aws:s3:::${rGuardDutyDeliveryS3Bucket}/*
194
+ Principal :
195
+ Service :
196
+ - guardduty.ap-southeast-4.amazonaws.com
197
+ - guardduty.ap-east-1.amazonaws.com
196
198
197
199
- Sid : DenyIncorrectEncryptionHeader
198
200
Effect : Deny
@@ -209,13 +211,14 @@ Resources:
209
211
- Sid : DenyIncorrectEncryptionHeaderOptinRegions
210
212
Effect : Deny
211
213
Action : s3:PutObject
212
- Resource : !Sub arn:aws:s3:::${rGuardDutyDeliveryS3Bucket}/*
213
- Principal : ' *'
214
214
Condition :
215
- StringLike :
216
- aws:PrincipalServiceName : guardduty.*.amazonaws.com
217
- # StringNotEquals:
218
- # s3:x-amz-server-side-encryption-aws-kms-key-id: !Sub ${pGuardDutyOrgDeliveryKMSKeyArn}
215
+ StringNotEquals :
216
+ s3:x-amz-server-side-encryption-aws-kms-key-id : !Sub ${pGuardDutyOrgDeliveryKMSKeyArn}
217
+ Resource : !Sub arn:aws:s3:::${rGuardDutyDeliveryS3Bucket}/*
218
+ Principal :
219
+ Service :
220
+ - guardduty.ap-southeast-4.amazonaws.com
221
+ - guardduty.ap-east-1.amazonaws.com
219
222
220
223
221
224
Outputs :
0 commit comments