I have created a s3 bucket named xyz.com (Note:I didn't registered this domain) and uploaded index.html in it, given public permissions. from the properties section, enabled static website hosting and tested the endpoint it is working fine.
For bucket redirection, I have created www.xyz.com bucket and from the properties section, we have enabled redirection and given xyz.com as the redirection. When I click redirection endpoint, it is showing an error and not loadnig www.xyz.com.
xyz.com - s3 static website endpoint is working. www.xyz.com - S3 static website is not working in browser. Site is not opening.
Curl command output to www.xyz.com
curl -I http://www.xyz.com.s3-website-us-east-1.amazonaws.com
HTTP/1.1 301 Moved Permanently
x-amz-id-2: iEF0Wpr8Nbx5WUuzztLMMLFvC/EfldkeuKe7sKwCAYIxKnssLibUHqdN8YH9CXbNVEFG/uy7elw=
x-amz-request-id: C8819F6399B37586
Date: Mon, 06 Nov 2017 01:02:37 GMT
Location: http://mydingdongbucket.com/
Content-Length: 0
Server: AmazonS3
What am I missing?
note: I Didn't create any hosted zone for xyz.com. All I want to test is, S3 enpoint redirections.
Amazon S3 static web sites have specific bucket naming requirements.
If your domain name is www.mydomain.com then you must create a bucket with the name www.mydomain.com. Anything else will not work.
Like domains, subdomains must have their own S3 buckets, and the buckets must share the exact names as the subdomains.
Here is a link that walks you thru creating an S3 static web site.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.