Amplify doesn't update cognito aws-exports after push
On a project with configured auth:
amplify initenvAamplify pushamplify initenvBamplify push- here the appsync endopoints inaws-exports.jswill be from envB, but cognito data from envA
Amplify 4.6.0
@artyom-melnikov Do you mean "aws_cognito_identity_pool_id" and the ""aws_user_pools_web_client_id" keys which are the same as envA? I tried to reproduce this but wasn't able to. It correctly shows different userpools from the different environments with CLI v4.6.
Can you run "amplify env checkout aws_exports.js file?
Closing this issue due to lack of requested information. Please comment on this thread if you want us to re-open this issue if you're still stuck.
Having this same problem. Removed an old environment and created a new one; pushed; but aws-exports does not change to reflect the new user pool/identity.
i maybe got the same problem and resolved it with: amplify console > Backend environments > authentication then use the supplied "amplify pull" and "update" cmd in your CLI
same problem here as @jakepgoldman
Same problem following 'env add', 'env checkout' and 'push' - the cognito user pool app client IDs did not update. Executing an 'amplify pull' fixed it.
Somehow aws-exports.js was not updated by a config change for me. You can flush this by:
# Pushing up local state
amplify push
# Then, deleting local aws-exports.js
rm src/aws-exports.js
# Then, pulling down remote state, and rewriting aws-exports
amplify pull
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.