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"
]
}
}
}
]
}