AWS S3 设置存储桶外部访问

1. 设置公共访问,将阻止关闭

AWS S3 设置存储桶外部访问_第1张图片

2. 设置访问权限

AWS S3 设置存储桶外部访问_第2张图片

AWS S3 设置存储桶外部访问_第3张图片

3.设置存储桶策略

{
    "Version": "2012-10-17",
    "Id": "Policy",
    "Statement": [
        {
            "Sid": "Stmt",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::bucket_name/*"
        }
    ]
}
{
    "Version": "2012-10-17",
    "Id": "Policy",
    "Statement": [
        {
            "Sid": "Stmt",
            "Effect": "Allow",
            "Principal": "*",
            "Action": [
                "s3:GetBucketCORS",
                "s3:PutBucketCORS",
                "s3:GetObject"
            ],
            "Resource": [
                "arn:aws:s3:::bu",
                "arn:aws:s3:::bu/*"
            ],
            "Condition": {
                "StringLike": {
                    "aws:Referer": [
                        "https://www.com/*"
                    ]
                }
            }
        }
    ]
}

4.修改跨域访问




    *
    GET
    HEAD
    POST
    3000
    *



 

你可能感兴趣的:(服务器配置,FAQ)