Host index.html in subfolders of S3 Bucket

static website hosting works in the root directory, but this does not work for me:

my.bucket/index.html my.bucket/subfolder/index.html 

https://s3-eu-west-1.amazonaws.com/my.bucket works as expected

https://s3-eu-west-1.amazonaws.com/my.bucket/subfolder not working (Access Denied)

Is it possible?

+6
source share
2 answers

There are (at least) three ways to access a static website hosted in AWS.

  • Bucket Name S3
  • The name of the CDN. (this is what the master of the static website says)
  • The "static website hosting endpoint" that is listed on the S3 bucket management page

Only the "static website hosting endpoint" filters incoming requests to give Apache behavior; S3 is a RESTful API for storing files without the concept of subfolders.

If you used the wizard, in the lower left corner of the screen displays "Manage file on S3", which will open the page you need in the console, then click the "Properties" button.

+1
source

You need to change the permissions of the subfolder to make it public.

0
source

Source: https://habr.com/ru/post/989531/


All Articles