Cannot access Netlify CMS admin page with Gatsby when deployed on S3+CloudFront

Hi, I’m using Netlify CMS with Gatsby (and external GitHub OAuth Server). I have a link that says “Admin” that is linked to /admin/. When I test using gatsby develop, I have to click it twice to access the admin page (and redirected to /admin/#/), which I thought was weird. But the link works eventually and I can write new posts.

However, upon deployment, I just get 404 page despite trying many times to access the admin site. I’m not sure if the settings are incorrect but I’ve pretty much followed the directions. What could be wrong here?

My setup:
Gatsby CLI: 2.15.1
Gatsby: 2.26.1
gatsby-plugin-netlify-cms: 4.6.0
netlify-cms-app 2.14.1
nodejs: 14.15.1
Deployment on S3+CloudFront, CI using Github Actions

Hi there! Thanks for your interest in Netlify CMS. Looks like you posted your question a little while ago, but that you haven’t received a solution yet. Here’s where you might get more help: - the site houses our extensive documentation that likely contains helpful information to get you back on track.

netlify cms slack - join our friendly slack channel and chat with other cms pros to get the help you need.

GitHub Issues - think you’ve found a bug, or would like to make a feature request? Make your voice heard here. Netlify CMS is open source - PRs and other contributions are also welcome!

Stack Overflow Check StackOverflow for questions tagged “Netlify CMS” if you don’t get an answer in the Slack or the GH issues. StackOverflow reaches a worldwide audience of knowledgeable people.

Your question will be left open here for anyone to comment - but we encourage you to check out the above resources if you are still looking for a solution!