Skip to content

Commit a9eb69a

Browse files
authored
Merge pull request aws-samples#38 from jplock/jp-network-vpce
[feat] add EnforceNetworkPerimeter policy for S3
2 parents 8195976 + 7d896d2 commit a9eb69a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

template.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,22 @@ Resources:
209209
"aws:ResourceTag/dp:exclude:identity": "true"
210210
BoolIfExists:
211211
"aws:PrincipalIsAWSService": "false"
212+
- Sid: EnforceNetworkPerimeter
213+
Effect: Deny
214+
Principal: "*"
215+
Action: "s3:*"
216+
Resource: "*"
217+
Condition:
218+
StringNotEqualsIfExists:
219+
"aws:VpceOrgID": !If
220+
- cHasOrganizationId
221+
- !Ref pOrganizationId
222+
- !GetAtt rOrganization.Id
223+
"aws:PrincipalTag/dp:exclude:network": "true"
224+
"aws:ResourceTag/dp:exclude:network": "true"
225+
BoolIfExists:
226+
"aws:PrincipalIsAWSService": "false"
227+
"aws:ViaAWSService": "false"
212228
- Sid: EnforceConfusedDeputyProtection
213229
Effect: Deny
214230
Principal: "*"

0 commit comments

Comments
 (0)