...
| Code Block |
|---|
{
"Version": "2008-10-17",
"Id": "PolicyForCloudFrontPrivateContent",
"Statement": [
{
"Sid": "AllowCloudFrontServicePrincipal",
"Effect": "Allow",
"Principal": {
"Service": "cloudfront.amazonaws.com"
},
"Action": "s3:GetObject",
"Resource": [
"arn:aws:s3:::shawn-uat/pic1/*",
"arn:aws:s3:::shawn-uat/pic2/*"
],
"Condition": {
"StringEquals": {
"AWS:SourceArn": "arn:aws:cloudfront::893420598334:distribution/E1Y22YBY7JPKJ6"
}
}
}
]
} |
8.s3桶有以下文件:
测试访问路径:
https://d31k00r8qiux4n.cloudfront.net/pic1/boat.jpg (pic1路径下可访问)
...
