Serving a multitude of static sites from a wildcard domain in AWS

CloudFront + Lambda@Edge + S3 can do this “serverless.” Lambda@Edge is a CloudFront enhancement that allows attributes of requests and responses to be represented and manipulated as simple JavaScript objects. Triggers can be provisioned to fire during request processing, either before the cache is checked (“viewer request” trigger) or before the request proceeds to the … Read more

Cloudfront redirect www to naked domain with ssl [closed]

To host website on AWS so that: https://www.example.com, http://www.example.com and http://example.com all redirect to https://example.com you need to: Create two S3 buckets named: example.com and www.example.com. Turn on the Static Website Hosting on these two buckets. Configure redirect in bucket www.example.com to: https://example.com. In the bucket properties choose Static Website Hosting => Redirect all requests … Read more