Directory Listing in S3 Static Website

0 votes

I set up an S3 bucket to host the static files.

While using the website endpoint (http://.s3-website-us-east-1.amazonaws.com/): it forces me to set an index file. When the file isn't found, it throws an error instead of listing directory contents.

When using the s3 endpoint (.s3.amazonaws.com): I get an XML listing of the files, but I need an HTML listing that users can click the link to the file.

I tried setting the permissions of all files and the bucket itself to "List" for "Everyone" in the AWS Console, but still, it's not working

I have also tried some of the javascript alternatives, but they either don't work under the website url (that redirects to the index file) or just don't work at all. As a last resort, a collapsible javascript listing would be better than nothing, but I haven't found a good one.

Is this possible? If so, do I need to change permissions, ACL or there is something else?

Jul 18, 2018 in AWS by Flying geek
• 3,160 points
692 views

1 answer to this question.

0 votes

There is also a solution: https://github.com/caussourd/aws-s3-bucket-listing

Similar to https://github.com/rgrp/s3-bucket-listing but I couldn't make it work with Internet Explorer. So https://github.com/caussourd/aws-s3-bucket-listing works with IE and also add the possibility to order the files by names, size and date. On the downside, it doesn't follow folders: only the files at one level are displayed.

answered Jul 18, 2018 by Cloud gunner
• 4,280 points

Related Questions In AWS

0 votes
1 answer

S3 Static Website Hosting Route All Paths to Index.html

Yes there is an easy way to ...READ MORE

answered Apr 8, 2018 in AWS by code_ninja
• 6,220 points
577 views
0 votes
1 answer

Hosting static website with AWS S3 and Route 53

Add an additional bucket called myblog.com and ...READ MORE

answered Dec 4, 2018 in AWS by Archana
• 5,560 points
97 views
+5 votes
3 answers
+3 votes
5 answers

Renaming files in S3

You can either use AWS CLI or ...READ MORE

answered Oct 16, 2018 in AWS by petter dj
1,150 views
+1 vote
2 answers

AWS CloudWatch Logs in Docker

The awslogs works without using ECS. you need to configure ...READ MORE

answered Sep 6, 2018 in AWS by bug_seeker
• 15,350 points
394 views
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,900 points
218 views
0 votes
1 answer

Trying to upload data stream in Amazon S3

Try adding the ContentType & ACL in ...READ MORE

answered Jun 28, 2018 in AWS by Cloud gunner
• 4,280 points
438 views
0 votes
2 answers

Receiving SMS from users and stores in AWS

As far as I know, receiving international ...READ MORE

answered Aug 21, 2018 in AWS by Priyaj
• 56,900 points
88 views