Hello there! I am hosting my personal portfolio site on S3, and I’m building it with Gatsby. I’ve chosen S3 as my hosting option on Gatsby Cloud. I’ve also added some environment variables (in both .env.* and Gatsby Cloud) that I need once the build finishes. It works great in development, but when logging these variables on production after Gatsby Cloud finishes a build, they are all undefined.
If I ignore Gatsby Cloud and build and deploy with npm to S3 directly, the environment variables are found.
I have also added a Cloudfront invalidation on GCloud for /* (everything).
Thanks again for following up and providing that context! I reached out an internal ticket to take a closer look into this, as we’ll likely need a bit more info on how these environment variables are configured.