Created
September 15, 2018 17:20
-
-
Save skellertor/b40e50e202808a0dd3803fdd157c7bfc to your computer and use it in GitHub Desktop.
s3 static hosting redirect all requests to index.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create S3 bucket, for example: react | |
Create CloudFront distributions with these settings: | |
Default Root Object: index.html | |
Origin Domain Name: S3 bucket domain, for example: react.s3.amazonaws.com | |
Go to Error Pages tab, click on Create Custom Error Response: | |
HTTP Error Code: 403: Forbidden (404: Not Found, in case of S3 Static Website) | |
Customize Error Response: Yes | |
Response Page Path: /index.html | |
HTTP Response Code: 200: OK | |
Click on Create |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment