-
Notifications
You must be signed in to change notification settings - Fork 820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to migrate auth after upgrade amplify cli from version 6 to 12 #13905
Comments
Hey @JaysZila, thank you for reaching out. Could provide is the current version of the
|
Hi @ykethan This is my cli-input.json
My current cli.json does not have forceAliasAttributes. And also, user pool is configured to use username as the key for login.
backend-config.json, amplify-meta.json |
Hey @JaysZila, thank you for posting the |
@ykethan Thank you for your reply. I tried updating it to true, but it still resulted in the same error message. |
@JaysZila by any chance was this manually updated on the console?
On the CloudFormation console, could you check the auth nested stack template for |
@ykethan I'm not sure about manually updated on the console since I'm not part of the team project from the beginning To give you more detail on Before running amplify update auth
After running amplify update auth
cli-inputs.json, which was created under the backend/auth folder I’m not quite sure about the If not, then I ran this command in the AWS console to check the details of the User Pool
The result is that there is no |
Hey @JaysZila, on a bit of a deep dive, noticed a similar issues: #10846 and #10447. The comments #10846 (comment), #10447 (comment) provided a workaround of removing the |
@ykethan Thank you so much. After removing it, amplify push worked fine. However, I just noticed that after upgrading to Amplify CLI 12 and updating auth (walkthrough options with the same configuration when using amplify cli version 6), the number of resources in the auth category was reduced to 7 (from 11 before). Do you have any idea why this might have happened? I’m not sure if it will affect the authentication flow or not. Resource which was removed
No matter how I add it back to the CloudFormation file, after running amplify push, it always creates a build folder with the CloudFormation file containing only 7 resources. |
Hey @JaysZila, this is currently the expected behavior and should not effect the authentication flow. The resources were refactored as part of our improvements to the Auth resource. |
Closing the issue due to inactivity. Do reach out to us if you are still experiencing this issue |
This issue is now closed. Comments on closed issues are hard for our team to see. |
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
20.15.0
Amplify CLI Version
12.10.1
What operating system are you using?
MacOs
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made
Describe the bug
My project was recently upgraded from Amplify CLI version 6.0.0 to 12.10.1. After the upgrade, when I ran the amplify push command, it displayed the following error:
“Auth triggers have been configured using an older version of the CLI and must be migrated before they can be deployed. Run amplify update auth and select ‘yes’ at the migration prompt. Then retry the deployment using amplify push.”
I have run amplify update auth with the following options:
Successfully updated the Cognito trigger locally
Successfully updated the Cognito trigger locally
Successfully updated the Cognito trigger locally
✅ Successfully updated auth resource myAuth locally
After the migration was completed, it removed myAuth-cloudformation-template.json, auth-trigger-cloudformation-template.json, and parameter.json files and added cli-input.json instead.
After that, I manually re-added myAuth-cloudformation-template.json and auth-trigger-cloudformation-template.json (my project have custom lambda trigger created before) back to the project and pushed the changes to the cloud again.
However, I encountered the following error:
The following resources failed to deploy:
Resource Name: UserPool (AWS::Cognito::UserPool)
Event Type: update
Reason: Resource handler returned message: "Invalid request provided: Updates are not allowed for property - UsernameConfiguration." (RequestToken: xxxxxx, HandlerErrorCode: InvalidRequest)
Expected behavior
amplify push needs to work normally after the migration is completed.
Reproduction steps
Project Identifier
No response
Log output
Additional information
My cloudformation stack details (Auth)
Resources
Parameters include usernameCaseSensitive: false
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: