I have a domain with AWS with static website hosting option with S3.
Have all my static files under S3 with the bucket name as
domain.com
Since I need https, I created CloudFront with the following alternate CNAMEs.
domain.com
www.domain.com
Have A records for both domain.com & www.domain.com.
For domain.com --> CloudFront
For www.domain.com --> route to domain.com
Hitting, domain.com works, but www.domain.com gives error that bucketname wwww.domain.com doesn't exist.
I can create one more bucket with www.domain.com and copy all the static files. Is this the only approach?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…