Last active
August 29, 2015 14:05
-
-
Save mumoshu/356563c3f25ab2f9b0e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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