Skip to content

Instantly share code, notes, and snippets.

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 mumoshu/356563c3f25ab2f9b0e6 to your computer and use it in GitHub Desktop.
Save mumoshu/356563c3f25ab2f9b0e6 to your computer and use it in GitHub Desktop.
{
"Version": "2008-10-17",
"Id": "Policy<UNIQUE_ID>",
"Statement": [
{
"Sid": "Stmt<UNIQUE_ID>",
"Effect": "Deny",
"NotPrincipal": {
"AWS": "arn:aws:iam::アカウントID:user/Wercker向けIAMユーザ名"
},
"Action": "s3:*",
"Resource": "arn:aws:s3:::<BUCKET_NAME>/*",
"Condition": {
"NotIpAddress": {
"aws:SourceIp": [
"<IP/CIDR1>",
"<IP/CIDR2>",
"..."
]
}
}
},
{
"Sid": "Stmt<UNIQUE_ID>",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::<BUCKET_NAME>/*",
"Condition": {
"IpAddress": {
"aws:SourceIp": [
"<IP/CIDR1>",
"<IP/CIDR2>",
"..."
]
}
}
},
{
"Sid": "AllowBucketAndObjectsAccessFromWercker",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::アカウントID:user/Wercker向けIAMユーザ名"
},
"Action": "s3:*",
"Resource": "arn:aws:s3:::<BUCKET_NAME>/*"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment