Pierre
Pierre

Reputation: 1096

Website hosting in specific folder on AWS S3

Is there any way on AWS S3 to host a website inside a specific folder ?

Example: http://my-bucket.s3-website-us-west-2.amazonaws.com/ pointing to /build folder.

Thanks in advance,

Pierre

Upvotes: 4

Views: 2978

Answers (2)

filipebarretto
filipebarretto

Reputation: 1952

Yes. You can.

If you integrate with AWS CloudFront, you will set the CloudFront distribution's Origin Domain Name as your S3 Bucket's Static Website Hosting Endpoint and the Origin Path to the index.html file inside the build folder.

Upvotes: 9

E.J. Brennan
E.J. Brennan

Reputation: 46859

No, the website must be in a bucket, and the bucket must match the domain. Files within the website can live in folders, but the root must be at the bucket's top level.

Upvotes: 3

Related Questions