How to access S3 bucket root from CloudFront sub directory

Viewed 39

How can I access S3 Root: /

from CloudFront sub directory: https://example.com/foo/ ?

I don't wanna change S3 directory structure (moving /* to /foo/*)

What I've tried

  1. Use S3 redirection rules: redirected to S3 static hosting url (not CloudFront)
  2. Use CloudFront Lambda Function Associations: when I rewrite /foo/* to /*, I get what I wanted on /foo/* but I must place the same contents on /*. (Because it's not routing but url rewriting)
0 Answers
Related