Which Category is your question related to?
Usage
What AWS Services are you utilizing?
Amplify / Auth (Cognito)
Provide additional details e.g. code snippets
I am trying to use AWS Amplify with React Native and intend to use the Auth feature.
Earlier, I had followed this tutorial on Youtube and in there, we used AWS Mobile CLI. Now, I am using Amplify CLI (though I am still not sure what the difference is).
With the AWS Mobile CLI, I observed that it had created some entries in the .gitignore
file.
Now, with the AWS Amplify CLI, I observe that no entries have been created in the .gitignore
file, even though it has created the amplify
folder and .amplifyrc
, aws-exports.js
files.
My question is should I commit the created files and folders in git or is this a bug and the files and folders should actually have been ignored?
@callmekatootie The aws-exports file should not be committed to source control, nor should the amplify folder generally. This contains your backend AWS information. it is at your discretion ultimately (private repos), but we recommended not committing it. We try not to modify too much of your project/code i.e. edit your .gitignore etc.
The difference between the CLIs is the AWS Mobile CLI uses AWS Mobile Hub to spin up your backend, and the AWS Amplify CLI uses CloudFormation instead and is a completely different, pluggable architecture.
The .amplifyrc file IS meant to be committed to source control and provides you some basic information about your backend for sharing with your team. This concept / feature in regards to the CLI is still in development (team sharing and collaboration) but will utilize this file in the near future. We are working on more documentation around the CLI and toolchain in general and should have this available very soon. I hope this answers your question. Let us know if you need further help and thanks for your feedback!
That was helpful. Thanks much @mlabieniec
Thanks @mlabieniec, that's very helpful. I would like to keep the graphql schema in version control to track changes.
The one located at amplify/backend/api/[appname]/schema.graphql
Would that be ok?
Most helpful comment
@callmekatootie The aws-exports file should not be committed to source control, nor should the amplify folder generally. This contains your backend AWS information. it is at your discretion ultimately (private repos), but we recommended not committing it. We try not to modify too much of your project/code i.e. edit your .gitignore etc.
The difference between the CLIs is the AWS Mobile CLI uses AWS Mobile Hub to spin up your backend, and the AWS Amplify CLI uses CloudFormation instead and is a completely different, pluggable architecture.
The .amplifyrc file IS meant to be committed to source control and provides you some basic information about your backend for sharing with your team. This concept / feature in regards to the CLI is still in development (team sharing and collaboration) but will utilize this file in the near future. We are working on more documentation around the CLI and toolchain in general and should have this available very soon. I hope this answers your question. Let us know if you need further help and thanks for your feedback!