Why is my Amazon S3 bucket returning a list of objects instead of the website's index page?
I'm using an Amazon Simple Storage Service (Amazon S3) bucket to host my static website. Why is the bucket returning a list of objects instead of the website's index page?
"I'm using an Amazon Simple Storage Service (Amazon S3) bucket to host my static website. Why is the bucket returning a list of objects instead of the website's index page?Short descriptionIf you send a GET request to the bucket, then send the request to the website endpoint so that Amazon S3 returns the index page. Otherwise, Amazon S3 returns a list of objects in the bucket if you have permissions to the ListBucket API call.If you use an Amazon CloudFront distribution with an Amazon S3 origin, then you must also set the index page as the default root object.ResolutionFollow these steps to find your bucket's website endpoint:Open the Amazon S3 console.From the bucket list, choose the bucket that you're using to host the static website.Choose the Properties view, and then choose Static website hosting. The website endpoint is the value that's listed as Endpoint.If you're using CloudFront distribution with an Amazon S3 origin, then follow these steps to set your distribution's default root object to the index page:Open the CloudFront console.From the distribution list, choose the distribution that's associated with your S3 bucket.From the General view, choose Edit.For Default Root Object, enter the object name of your index page. For example, "index.html".Choose Yes, Edit.Note: Endpoints vary by AWS region. For website endpoints by region, see Amazon S3 website endpoints. For REST API endpoints by region, see Amazon S3 endpoints.Related informationKey differences between the Amazon website and the REST API endpointFollow"