SPA - Cloudfront + S3 403/404 error

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
CloudFront
Distributions
Error Pages
Create custom error reponse
HTTP error code 403 // HTTP error code 404
Customize error reponse
Yes
Response page path : /index.html
HTTP Reponse code : 200
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
