title: How to redirect non www to www in aws s3 bucket and cloudfront
body: <p>I know how to redirect/rewrite non-www to www using .htaccess in apache server. But I have no clue, about s3 bucket, and CloudFront. I have hosted the website on an s3 bucket using CloudFront.</p>
  
  <p>How do I redirect all <a href="http://example.com/" rel="nofollow noreferrer">http://example.com/</a> requests to <a href="http://www.example.com" rel="nofollow noreferrer">http://www.example.com</a></p>