Comments (4)
Hey @robinmalburn 👋 thanks for raising this! The primary reason this file is gitignored is due to it holding references to resources for a specific environment. If you are in a situation where you have a private repo and one branch/env, committing this file is fine -- after all it will be used in your frontend application and surfaced to the client.
In Amplify (Gen 1) this file is created on amplify init
, pull
, env checkout
, and push
. Maybe a few others, but those are the primary commands you'd interact with that will create/update this file.
This file is somewhat similar to dotenv files where you may have a set of required env vars for your application to work, but they are often tied to the environment and change across environments.
from docs.
Hi @josefaidt, many thanks for the quick response.
Treating the file like a dotenv equivalent makes a lot of sesne, especially in a multi-dev / multi-env environment. With that in mind, recommending it goes in .gitignore
makes total sense.
I think the missing piece of the puzzle, for me at least, is that during builds, it seems like Amplify can automatically run an amplify pull (though it says it'll create aws-exports.js
, I assume it actually creates an amplifyconfiguration.json
instead/as well).
I wonder if there's a way that could be called out more clearly in the docs (or located alongside the place it says the file shouldn't be tracked), just to sign post people to how to best link up the backend deployment side of things. If there's a way of keeping things autogenerated at build time instead of being tracked, in light of the use case conversation, that definitely seems like a good path to nudge people down.
from docs.
I probably have a lot more ground to cover. Nonetheless, how does one fix this then?
I am hosting this in a private repo and am inclined to just commenting-out everything that Amplify created in .gitignore
from docs.
Might be useful https://docs.amplify.aws/gen2/reference/amplifyconfiguration/
from docs.
Related Issues (20)
- document function `Cannot find module '$amplify/env/say-hello'` error on nextjs frontend build
- Flutter Quickstart Gen2 - example will not run HOT 3
- The displayed command information is outdated
- [Gen2] Rest API setup will cause error "Subscribe only available for AWS AppSync endpoint"
- Nuxt SSR guide for Gen 2 is incorrect about Amplify support HOT 1
- Docs are missing an explanation of model's authorization operations
- add auth example for federating with Google, Facebook, etc.
- The client code for Android and Flutter are in typescript language
- Callout for errors like: TypeError: Cannot read properties of null (reading 'id')
- Provide example of how to reference resources for AppSync API's
- Clarify what "base project directory" means HOT 1
- Typescript step debugging instructions for Amplify Gen 2
- Quickstart "npx ampx sandbox" issue HOT 1
- add errors to API documentation
- document Auth0 example on auth
- AWS Amplify Gen 2 with Next.js 14: Implementing ISR for App Router
- New Amplify Docs are almost unusable HOT 2
- Next.js code on React auth page
- Suggested RDS database setup instructions lead to typescript error HOT 1
- Swift Quickstart Guide skips over Github integration and dead link for Github integration guide
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.