amplify env checkout <env> should update aws-exports.js file
See original GitHub issueDescribe the bug
When you do amplify env checkout <env>
the aws-exports.js
file does not update, it will still contain settings of the previous environment.
To work around this, you can do amplify init
and choose an existing environment and choose the <env> you checkout to.
To Reproduce
- Check
aws-exports.js
- Do
amplify env checkout <env>
- Check
aws-exports.js
- Realize that it hasn’t changed to reflect the environment settings you are in.
Expected behavior
amplify env checkout <env>
should update aws-exports.js
file to reflect the settings of the current environment you checkout to.
Additional context
To work around this, you can do amplify init
and choose an existing environment and choose the <env>
you checkout to.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Environment variables - AWS Amplify Hosting
By default, Amplify applies the environment variables across all branches, so you don't have to re-enter variables when you connect a new branch....
Read more >Advanced workflows - Headless mode for CI/CD - Amplify Docs
The CLI will place and update the aws-exports.js file in it, the aws-exports.js file is used to configure the Amplify JS library.
Read more >If you use Amplify and Git branches, you are going to have a ...
Creates/modifies files that say "what is the current environment in this machine". Similarly to Git, where you can checkout multiple branches ...
Read more >What happens if I edit aws-exports.js? - Stack Overflow
If you edit it, it won't affect any of the backend configuration, and will be re-generated on backend changes. It's true that Amplify...
Read more >Amplify multi-env setup causing my production build with ...
I created two environment branch on both git and amplify - dev and production. ... setup switch to production is by checking inside...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
still not solved in amplify -v 4.40.0
@aprilmintacpineda it seems to be a valid request, I marked it as a bug, thanks for reporting it.