amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

Amplify doesn't update cognito aws-exports after push

Open artyom-melnikov opened this issue 6 years ago • 8 comments

On a project with configured auth:

  1. amplify init envA
  2. amplify push
  3. amplify init envB
  4. amplify push - here the appsync endopoints in aws-exports.js will be from envB, but cognito data from envA

Amplify 4.6.0

artyom-melnikov avatar Dec 19 '19 08:12 artyom-melnikov

@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 " and see if you still see the user pool key from envA in the aws_exports.js file?

kaustavghosh06 avatar Dec 19 '19 21:12 kaustavghosh06

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.

kaustavghosh06 avatar Jan 16 '20 22:01 kaustavghosh06

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.

jakepgoldman avatar Mar 09 '20 02:03 jakepgoldman

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

Tilko avatar Aug 02 '20 19:08 Tilko

same problem here as @jakepgoldman

yaquawa avatar Jan 15 '21 11:01 yaquawa

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.

gbumgard avatar Feb 18 '21 01:02 gbumgard

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

ctjlewis avatar Apr 30 '21 05:04 ctjlewis

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.

github-actions[bot] avatar May 30 '21 05:05 github-actions[bot]