SPA - Cloudfront + S3 403/404 error

Taegu KangTaegu Kang
1 min read
  • outline

SPA architecture using route53, CloudFront(CNAME) and S3 can occurs 403 error when direct access to sub-path. For normal root routing, 403 or 404 are needed to be redirected to 200 and /index.html.

  • how-to
  1. CloudFront

  2. Distributions

  3. Error Pages

  4. Create custom error reponse

  5. HTTP error code 403 // HTTP error code 404

  6. Customize error reponse

  7. Yes

  8. Response page path : /index.html

  9. HTTP Reponse code : 200

  10. Invalidation /*

0
Subscribe to my newsletter

Read articles from Taegu Kang directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Taegu Kang
Taegu Kang