Coder Social home page Coder Social logo

Comments (4)

josefaidt avatar josefaidt commented on June 17, 2024

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.

robinmalburn avatar robinmalburn commented on June 17, 2024

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.

ilko-masaldzhiyski avatar ilko-masaldzhiyski commented on June 17, 2024

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.

GaNiziolek avatar GaNiziolek commented on June 17, 2024

Might be useful https://docs.amplify.aws/gen2/reference/amplifyconfiguration/

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.