When a request is made to an nonexistent file, an 403 error by S3 is returned. For SPA apps this is not desirable as a custom router should be the one handling such request.
Configuration should be made to respond with the index.html file and a 200 status code for every 404 (and possibly 403) error status code on CloudFront error pages.
This might be wanted to be done conditionally to not affect other non SPA websites.