Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

243
Views
How to host multiple static sites on s3 through CloudFront?

I have multiple static sites, each bundled with one index.html file, and each one lives in its own s3 bucket, so my list of buckets would look something like:

site-version-1
    page-1.js
    page-2.js
    index.html
site-version-2
    page-1.js
    page-2.js
    index.html

Where site-version-1 and site-version-2 are both origins of my CloudFront distribution. I would like to be able to visit http://cloudfront-url/site-version-1/page-1 and http://cloudfront-url-site-version-2/page-1 and have those pages be correlated with their appropriate bundles, but I'm a bit stuck as to how I would correlate the name of the bucket with a page under the distribution, if that's directly possible at all.

I've also tried having everything in the same bucket, but in different folders--so that bucket looked like:

bucket
    site-version-1
        page-1.js
        page-2.js
        index.html
    site-version-2
        page-1.js
        page-2.js
        index.html

In this case, when I visit the CloudFront url followed by the name of the folder, it wouldn't know which page I was trying to view.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!