<p>I have an aws s3 bucket at <code>bucket.com.s3-website.us-east-2.amazonaws.com/subfolder/static-site-folder/</code></p>
<p>I want to route a domain directly to the sub-folder /subfolder/static-site-folder/</p>
<p>This is because I want to have multiple static sites on a single bucket.</p>
<p>So I want something like this</p>
<p>example-domain.com -&gt; bucket.com.s3-website.us-east-2.amazonaws.com/subfolder/static-site-folder-1/</p>
<p>example-domain-2.com -&gt; bucket.com.s3-website.us-east-2.amazonaws.com/subfolder/static-site-folder-2/</p>
<p>example-domain-3.com -&gt; bucket.com.s3-website.us-east-2.amazonaws.com/subfolder/static-site-folder-3/</p>
<p>Are there any solutions in aws? Or is my only option to setup a proxy server with Kubernetes to route traffic?</p>

Keith Becker
<p>Domain Name System (DNS) web service providers, such as Route53, do not &quot;see&quot; your folders. They only operate at the domain level, but url paths.</p>
<p>Probably the easiest way to achieve what you want would be by setting up <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DownloadDistS3AndCustomOrigins.html#concept_S3Origin_website" rel="nofollow noreferrer">CloudFront distro for your S3</a> and specifiyign <code>Origin Path</code> for your folder:</p>
<blockquote>
<p>If you want CloudFront to request your <strong>content from a directory in your Amazon S3 bucket</strong> or your custom origin, enter the directory name here, beginning with a /. CloudFront appends the directory name to the value of Origin Domain Name when forwarding the request to your origin, for example, myawsbucket/production. Do not include a / at the end of the directory name.</p>
</blockquote>
