I'm using AWS Cognito User Pool and have created some users. Now I would like to change some of the attributes for a specific user such as name, address, etc...
Is it possible to do this on an AWS Website? If so, how?
To update a cognito user's attributes use the admin-update-user-attributes command, specifying the user-pool-id , username and user-attributes parameters.
Short description. You can't change standard user pool attributes after a user pool is created. Instead, create a new user pool with the attributes that you want to require for user registration. Then, migrate existing users to the new user pool by using an AWS Lambda function as a user migration trigger.
In the navigation pane, choose User Pools, and choose the user pool you want to edit. Choose the Sign-in experience tab and locate Federated sign-in. Choose Add an identity provider, or choose the Facebook, Google, Amazon or Apple IdP you have configured. Locate Attribute mapping and choose Edit.
The user name is a fixed value that users can't change. If you mark an attribute as an alias, users can sign in with that attribute in place of the user name. You can mark the email address, phone number, and preferred username attributes as aliases.
The console does not have that capability but it can be done in the AWS Command Line Interface.
aws cognito-idp admin-update-user-attributes \ --user-pool-id xxx \ --username yyy \ --user-attributes Name=xxx,Value=yyy Name=ttt,Value=sss ...
Custom attributes use the following syntax:
--user-attributes Name="custom:attributeName",Value="value with space"
You need to set up your credentials with cli first (only the first time), via the command:
aws configure
but after that it is straightforward. For more:
aws cognito-idp admin-update-user-attributes help
The new Cognito console interface is able to edit now.
From console go to Amazon Cognito > User pools > {the user pool you want to select} > {user you want to edit}
Under "User attributes" card, click "Edit" on the right
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With