自己常用的policy,分享出来,希望大家可以用得到,以后在此基础上持续更新:
受限的合作方:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
{ "Version": "2012-10-17", "Statement": [ { "Sid": "Stmt1384767876001", "Effect": "Allow", "Resource": ["arn:aws:s3:::bucketname"], "Condition":{"StringLike":{"s3:prefix":["music/partner/${aws:username}/*"]}}, "Action": ["s3:*"] }, { "Action":["s3:*"], "Effect":"Allow", "Resource": ["arn:aws:s3:::bucketname/music/partner/${aws:username}/*"] } ] } |
受限的资源:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
{ "Version": "2012-10-17", "Statement": [ { "Sid": "Stmt1384767876001", "Effect": "Allow", "Resource": ["arn:aws:s3:::bucketname"], "Condition":{"StringLike":{"s3:prefix":["h5/*"]}}, "Action": ["s3:*"] }, { "Action":["s3:*"], "Effect":"Allow", "Resource": ["arn:aws:s3:::bucketname/h5/*"] } ] } |
EC2;
[crayo[……]