Skip to content
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

Required Attributes out of sync between Cognito, Cloudformation, and Auth #13573

Closed
2 tasks done
julien-tamade opened this issue Feb 3, 2024 · 2 comments
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

Comments

@julien-tamade
Copy link

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. requiredAttributes requested 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

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@julien-tamade julien-tamade added the pending-triage Issue is pending triage label Feb 3, 2024
@josefaidt
Copy link
Contributor

Hey @julien-tamade 👋 just noticed this one after replying to the other and re-opening 😅 I'll close this in favor of tracking #13531

@josefaidt josefaidt closed this as not planned Won't fix, can't repro, duplicate, stale Feb 3, 2024
@josefaidt josefaidt added the duplicate If marked with duplicate, issue will be closed & original will be added for traceability label Feb 3, 2024
Copy link

github-actions bot commented Feb 3, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate If marked with duplicate, issue will be closed & original will be added for traceability pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

2 participants