aws 创建s3

创建s3

上传文件

访问资源

CloudFront

创建CloudFront

cname

IAM

创建s3用户

 

设置安全凭证

访问密钥

控制台登录

s3 权限策略

AmazonS3Smartdao-imgAccess

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "s3:*"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": "s3:*",
            "Resource": "arn:aws:s3:::xxxxxxx"  # 替换为自己的桶
        },
        {
            "Sid": "VisualEditor2",
            "Effect": "Allow",
            "Action": "s3-object-lambda:*",
            "Resource": "arn:aws:s3:::xxxxxxx"   # 替换为自己的桶
        }
    ]
}

跨源资源共享(CORS)

[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "GET",
            "PUT",
            "POST",
            "HEAD",
            "DELETE"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": [
            "ETag"
        ]
    }
]
posted @ 2023-06-01 15:10  小吉猫  阅读(34)  评论(0编辑  收藏  举报