S3 静态网站搭建


S3 可以托管静态网站,格式是bucket-name.s3-website-region.amazonaws.com.cn

访问网站下的对象:http://bucket-name.s3-website.Region.amazonaws.com/object-name)

需要设置的bucket policy

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws-cn:s3:::bucket/**",
            "Condition": {
                "IpAddress": {
                    "aws:SourceIp": [
                        "ip1/32",
                        "ip2/32"
                    ]
                }
            }
        }
    ]
}

文章作者: AWS Learner
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 AWS Learner !
评论
  目录