Last active
March 31, 2018 08:40
-
-
Save mumoshu/15a5a15a7d3c44ec8530 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2008-10-17", | |
"Id": "Policy<UNIQUE_ID>", | |
"Statement": [ | |
{ | |
"Sid": "Stmt<UNIQUE_ID>", | |
"Effect": "Deny", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action": "s3:*", | |
"Resource": "arn:aws:s3:::<BUCKET_NAME/*", | |
"Condition": { | |
"NotIpAddress": { | |
"aws:SourceIp": [ | |
"<IP/CIDR1>", | |
"<IP/CIDR2>", | |
"..." | |
] | |
} | |
} | |
}, | |
{ | |
"Sid": "Stmt<UNIQUE_ID>", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::<BUCKET_NAME>/*", | |
"Condition": { | |
"IpAddress": { | |
"aws:SourceIp": [ | |
"<IP/CIDR1>", | |
"<IP/CIDR2>", | |
"..." | |
] | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment