The Serverless-Stack demo handles 4xx errors using the technique shown at the top of this Stack Overflow posting:
However, there is quite a bit of discussion about the proper way to handle the error in the comments of that posting.
Is the way Serverless-Stack handles errors still the best way. The least “hacky” way?
Here’s another approach: https://viastudio.com/hosting-a-reactjs-app-with-routing-on-aws-s3/