Skip to content

Instantly share code, notes, and snippets.

@sergejmueller
Last active February 23, 2019 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergejmueller/6b7e93069e286c9d04847a5d549e6391 to your computer and use it in GitHub Desktop.
Save sergejmueller/6b7e93069e286c9d04847a5d549e6391 to your computer and use it in GitHub Desktop.
AWS S3 Bucket Policy to protect a bucket web access by IP (Range)
{
"Version": "2012-10-17",
"Id": "Policy1550216993456",
"Statement": [
{
"Sid": "Stmt1550216977234",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::my-site/*",
"Condition": {
"IpAddress": {
"aws:SourceIp": "80.242.123.0/24"
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment