Skip to content

Instantly share code, notes, and snippets.

@hassaku63
Created November 11, 2015 09:37
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 hassaku63/64526c4da2ad3456ddfc to your computer and use it in GitHub Desktop.
Save hassaku63/64526c4da2ad3456ddfc to your computer and use it in GitHub Desktop.
{
"Version": "2012-10-17",
"Id": "Policy1234567890123",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::my-public-bucket/contents/*"
]
},
{
"Effect": "Deny",
"Principal": "*",
"Action": [
"s3:*"
],
"Resource": [
"arn:aws:s3:::my-public-bucket/contents/admin/*"
],
"Condition": {
"NotIpAddress": {
"aws:SourceIp": ["x.x.x.x/32", "y.y.y.y/32"]
}
}
}
]
}
@hassaku63
Copy link
Author

PublicになっているS3上のコンテンツに対して、一部IP制限をかけるためのバケットポリシー。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment