What I have
-----------

I have an S3 bucket named `example-dev.com` configured for web hosting.

My S3 bucket has several child folders named `client-site.com` or `big-project.com`. So on S3 the URL to access the dev homepage for `client-site.com` is `example-dev.com.s3-website-us-east-1.amazonaws.com/client-site.com/index.html`. This carries over to about a dozen sites, and the list of sites changes regularly as clients come and go.

What I'm trying to do
---------------------

I'm trying to map that raw S3 URL to a sub domain of my `example-dev.com` custom domain. I want:

`client-site.com` `.example-dev.com` `/index.html`

to serve the file at

`example-dev.com.s3-website-us-east-1.amazonaws.com/` `client-site.com` `/index.html`

I would use DNS for the mappings, but there is a child folder for each site and the folders change regularly.

**I'd like to do this using serverless architecture if possible.** I have a version of this that works just fine using [`http-proxy`](https://github.com/nodejitsu/node-http-proxy) on a node server, but I wanna see if it's possible without a VPS. I think I'm meant to use API Gateway and/or Lambda, but I'm struggling to wrap my head around API Gateway and I don't know if Lambda is capable of remapping requests the same way http-proxy does.

Any help is appreciated, thanks very much!