Required Attributes out of sync between Cognito, Cloudformation, and Auth #13573
Closed
2 tasks done
Labels
duplicate
If marked with duplicate, issue will be closed & original will be added for traceability
pending-triage
Issue is pending triage
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
16.14.2
Amplify CLI Version
12.4.0 and 7.6.8
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No
Describe the bug
My production env cognito resource was created with 4 required attributes. I merged in changes from another env that had 1 required attribute and everything got messed up. On cognito it still shows 4 attributes required, on cloudFormation template it shows 4 "requiredAttributes" but only 1 attribute mentioned in the Schema field. When I try to push with the 4 attributes in my cli-inputs.json it fails throwing the following error:
Resource handler returned message: "Invalid AttributeDataType input, consider using the provided AttributeDataType enum.
but when i try to delete those attributes it gives me this error:
Cognito configuration in the cloud has drifted from local configuration. Present changes cannot be pushed until drift is fixed.
requiredAttributesrequested is ["given_name"], but ["birthdate","email","family_name","given_name"] is required by Cognito configuration. Update /Users/Julien/Documents/Flowly-Backend/amplify/backend/auth/tamadeIntegrationTest/cli-inputs.json to continue.
I got a successful push when I lowered the amplify version to 7.6.8, but now that i'm trying to go back up to 12.4.0, it fails.
Expected behavior
I would expect if I try to push with the correct required attributes that it would allow me
Reproduction steps
merge changes from another env with less required Attributes and push
Project Identifier
This command fails on my machine
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: