Do the following:
- Create a cognito user pool where email is the sign-in and name and phone_number are required attributes (and allow self-registration).
- Use the hosted UI to register an account with the user pool. Be sure to make a typo in your phone number.
- Go to the console UI and try to edit the phone number. Note that it is greyed out and uneditable.
- Try using aws cognito-idp admin-update-user-attributes to update the phone number. Note that you get an "(InvalidParameterException) when calling the AdminUpdateUserAttributes operation: user.phone_number: Attribute cannot be updated." error.
- While logged in as the user, try to use the cognitoidentityserviceprovider.updateUserAttributes API call to update the phone number. Note that you once again are told that the phone_number attribute cannot be updated.
Is there any way to fix the user's phone number in this case? I did see https://repost.aws/questions/QUnbai89EJThyvfcvTMxgoxQ/allow-a-user-to-fix-phone-number-attribute-during-sign-up , but before I go blow up my entire user pool an re-create it with no phone_number requirement I thought I'd double-check and see if there was any other solution.