Matthias
Matthias

Reputation: 361

Subdomains for S3 Bucket Folders

I want to dynamically route subdomains to S3 bucket folders. Whats the best way to achieve this?

Example:

I have a bucket called 'example' which has two folders, one called 'A' and another one called 'B'. Now I want to dynamically route a.example.com to folder 'A' and b.example.com to folder 'B'...and so on.

Hope this makes sense

Thanks

Upvotes: 3

Views: 506

Answers (1)

Charles Engelke
Charles Engelke

Reputation: 5649

It does make sense, but you can't do it. You can configure S3 and DNS to route one hostname to one bucket, but not to just part of a bucket.

If, instead of folders, you were willing to use two different buckets, then it is easy to set up the redirection of the two hostnames to the two different buckets.

Upvotes: 3

Related Questions