Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@lenaten
Last active December 6, 2017 10:59
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lenaten/96f7102c92b3a7d59a50 to your computer and use it in GitHub Desktop.
Save lenaten/96f7102c92b3a7d59a50 to your computer and use it in GitHub Desktop.
Hosting React app in s3 with CloudFront
- create s3 bucket, for example: react.
- create cloudfront distributions with these settings:
- Default Root Object: index.html
- Origin Domain Name: s3 bucket url, for example: react.s3.amazonaws.com
- add custom error page with these settings:
- HTTP Error Code: 403: Forbidden
- Customize Error Response: Yes
- Response Page Path: /index.html
- HTTP Response Code: 200: OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment