6

This is new to me so please excuse me if I have no idea what I'm talking about (: I'm trying to set up my own CDN with CloudFront and S3 through a subdomain by adding a CNAME to that subdomain to point to the CloudFront.

It seems like I get a 403 when trying to load the file, this is the original s3 link which seems to be working after setting the permission to everyone to open / download. But when trying to use the subdomain to request the file : http://cdn.chaoscod3r.com/libs/polyfills/json3_polyfill.js ; it seems like I get that 403.

Could anyone help me out with this one ?

1 Answer 1

10

You've to add the CNAME to the CloudFront distribution's settings as well. Simply goto AWS Console > CloudFront > Distribution > Distribution Settings > Alternate Domain Names(CNAMEs) and add the CNAME value cdn.chaoscod3r.com over there.

http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html

3
  • 8
    what if I have the CNAME added? I'm getting 403 Error: ERROR The request could not be satisfied. Bad request. Jun 4, 2015 at 18:22
  • Make sure in your route53 settings, your A / CNAME records are set up with: Alias Target: dxxxxxxx.cloudfront.net <-- with no period at the end!!!!
    – Tim
    Nov 9, 2018 at 15:16
  • is following helpful? aws.amazon.com/premiumsupport/knowledge-center/…
    – magnump0
    Mar 5, 2019 at 16:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .