I have a problem with a website I'm hosting in S3 and distributing via CloudFront.
In S3 have created 2 buckets, one for example.com and one for www.example.com both set to static webhosting and the www.example.com forwarding to example.com
In Route 53 I have a hosted zone for both sites with A record to the Cloudfront distribution
In CloudFront I have a distribution with CNAME/Alternate Domain Names for both www.example.com and example.com and I also have origin paths for both the s3 bucket paths for both www.example.com and example.com
When I browse to https://example.com it works fine When I browse to https://www.example.com it doesn't load and I get an error: Server IP address could not be found
What am I missing?