Skip to content

Instantly share code, notes, and snippets.

@krukru
Created November 22, 2019 11:14
Show Gist options
  • Save krukru/d129336217ea335d2d95962153101ca1 to your computer and use it in GitHub Desktop.
Save krukru/d129336217ea335d2d95962153101ca1 to your computer and use it in GitHub Desktop.
Limit S3 web access to only from our Office
{
"Version": "2012-10-17",
"Id": "Office-Only access",
"Statement": [{
"Sid": "Access-to-Office-IP-only",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:GetObject*",
"Resource": "arn:aws:s3:::BUCKET_NAME/*",
"Condition": {
"NotIpAddress": {
"aws:SourceIp": [
"213.186.4.78/32"
]
}
}
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment