Skip to content

Instantly share code, notes, and snippets.

View leandromsales's full-sized avatar

Leandro Melo de Sales leandromsales

View GitHub Profile
@leandromsales
leandromsales / README.md
Created November 28, 2022 15:29 — forked from zulhfreelancer/README.md
S3 Website + CloudFront - how to show index.html content when at /sub-directory/ path?

Problem

We have index.html file in S3 bucket under a folder called /about-us/. When checking in browser using CloudFront distribution link, custom-domain.com/about-us/ shows AccessDenied error.

But, custom-domain.com/about-us/index.html works fine and show content.

What we want

We want custom-domain.com/about-us/ to show the index.html content.