CORS error (Route53 + Cloudfront CNAME + S3)

AWS/Amazon CloudFront

  • outline

CORS error is tricky and hard to solve completely.

  • CORS configuration for S3
  1. Permission

  2. CORS

  3. AllowedOrigins

  • example
"AllowedOrigins": [
            "*"
        ],
  • CORS configuration for CloudFront
  1. Distributions

  2. Behavior

  3. Response headers policy

  4. CORS-With-Preflight

Cloudfront Invalidations

  • note

Wait several minites.

  • reference

https://docs.aws.amazon.com/AmazonS3/latest/userguide/ManageCorsUsing.html https://docs.aws.amazon.com/ko_kr/AmazonCloudFront/latest/DeveloperGuide/using-managed-response-headers-policies.html