Last active
August 29, 2015 14:02
-
-
Save alanwill/51540adcd1b3ff55d329 to your computer and use it in GitHub Desktop.
S3 bucket policy allowing access from a given IP or network
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": "2012-10-17", | |
"Id": "S3PolicyId1", | |
"Statement": [ | |
{ | |
"Sid": "IPAllow", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "s3:*", | |
"Resource": "arn:aws:s3:::<S3-bucket-name>/*", | |
"Condition": { | |
"IpAddress": { | |
"aws:SourceIp": "xxx.xxx.xxx.xxx/xx" | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment