redirect non www to www for static website hosting using cloudfront
Solution 1:
I ended finding out that i will need 2 S3 buckets one for the redirect and the other for my main site and host the main one behind cloudfront, also in route53 i route the www to cloudfront and the non-www to the S3 buckt that redirects to the www.
And that was it. It took me lots of digging to figure out i needed to make 2 S3 buckets. So for anyone else going through this, you need 2 S3 buckets, the other will be just for redirect and doesn't even have to have a single file in it, because it won't serve anything other than redirect