Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

23
  • 6
    since S3 responds with a 403 Forbidden when a file doesn't exist, I think step 4 above has to be duplicated for Http error code 403 as well Commented Mar 7, 2016 at 20:46
  • 4
    For me this is the only answer that results in an expected (accepted) behavior Commented Jul 25, 2016 at 21:08
  • 1
    I would not recommend. Generally, when you update your javascript or css the versioning signature on packages will get updated. However, the clients which are already running your application will have their index.html cached already and would not get the updated index.html. Hence, will try to reference older versions of your JS and CSS (still available on their local cache/CDN). This is sub-optimal. You can try to change your CDN config to change the expires headers for index.html so that it is not cacheable. Commented Aug 14, 2016 at 19:22
  • 1
    @moha297 One more question. Why not directly server index.html from the EC2 instance itself rather than proxying it? Commented Aug 21, 2016 at 9:57
  • 2
    @moha297 can you please explain this comment: "You should never serve index.html from a CDN"? I don't see the problem with serving index.html from S3 with CloudFront. Commented Mar 31, 2017 at 5:18