409
社区成员
发帖
与我相关
我的任务
分享
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "everyone can read file",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::testpolicy/readonly/*"
},
{
"Sid": "Allow get requests referred by www.example.com and example.com",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::testpolicy/refereronly/*",
"Condition": {
"StringLike": {
"aws:Referer": [
"http://www.example.com/*",
"http://example.com/*"
]
}
}
}
]
}
参考:https://docs.aws.amazon.com/zh_cn/AmazonS3/latest/dev/example-bucket-policies.html