Amazon Web Services – Connecting the React Router to S3

I'm using GatsbyJS to deploy a React site on AWS S3 -> Cloudfront with the plugin Gatsby-plugin-s3 (Https://

It works fine for my index page, but I can not display routes to other pages. Instead, I see a Access denied message.

I'm not sure how to add support for these pages on AWS unless you switch to an EC2 instance with a .htaccess file or using hash-based locations at the top of the index page.

How could I get these other routes online (for example, /page 2 instead of /page-2/index.html) through the hosting of static cloudfront websites?