I have an amplify react app with resources pushed to cloud. Unfortunately, when I went to commit I removed the team-provider-info.json without backing it up. I have every other file that originated with amplify in my local project. Can I regenerate team-provider-info.json without starting over? There is no information about that process here: https://aws-amplify.github.io/docs/cli-toolchain/quickstart#teamprovider
3 Answers
There is 2 ways you can generate (that I am aware of).
Firstly you need to view the stack within the cloudformation dashboard of AWS console.
Click the root stack of the environment you need to fix, then click the outputs tab.
This will list you a whole bunch of values to fill the cloudformation vales within the team provider json file.
You can either: 1. Regen the file by running this script in your terminal https://aws-amplify.github.io/docs/cli-toolchain/quickstart#environment-related-commands Or 2. Copy and paste the values into an existing team-provider-info.json file, however for the environment that needs fixing.

- 2,565
- 1
- 18
- 30
-
1No idea what is "stackformation dashboard of AWS console" – Severyn Katolyk Feb 06 '20 at 15:02
-
Sorry cloudformation @SeverynKatolyk https://console.aws.amazon.com/cloudformation/home – Dylan w Feb 17 '20 at 07:46
You can simple copy amplify project without team-provider-info.json in an other local directory and execute amplify push
in this directory. After login with the same aws account you can choose what Application to clone from the clouds. This will rename your amplify folder to amplify-tmp and generate fresh amplify folder with team-provider-info.json for the choosen Application. You can copy team-provider-info.json in the original project dir or work with new one.

- 7,223
- 3
- 25
- 38
go to the project root;
delete amplify folder;
launch amplify studio;
at the top right page click: Local setup instructions;
copy the line presented ;
example: amplify pull --appId xxxxxxxx --envName staging ;
paste the line in Terminal and follow instructions ;
This worked to me.

- 1
- 2