Skip to content

Instantly share code, notes, and snippets.

@alanwill
Last active August 29, 2015 14:02
Show Gist options
  • Save alanwill/51540adcd1b3ff55d329 to your computer and use it in GitHub Desktop.
Save alanwill/51540adcd1b3ff55d329 to your computer and use it in GitHub Desktop.
S3 bucket policy allowing access from a given IP or network
{
"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