Map wildcard subdomains to S3 static site folders

Viewed 971
1 Answers

yes, you can do it with Lambda@Edge functions.

First, map the wildcard (*) subdomain on Route53.

Then add the wildcard domain *.example.com to the alternate domain names in CloudFront

Write a Lambda function that changes the origin path based on the subdomain in the request. See an example here

Related