How to edit user attributes in AWS Cognito User Pool for specific user?

Amazon Web-ServicesAmazon Cognito

Amazon Web-Services Problem Overview


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?

Amazon Web-Services Solutions


Solution 1 - Amazon Web-Services

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

Solution 2 - Amazon Web-Services

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 enter image description here

Solution 3 - Amazon Web-Services

The OP asked how to change user attributes in Cognito. While the primary User Attributes and the custom attributes, can he viewed in the console, they cannot be changed there.
Here is a link to the Python API to access User properties: link. The update_user_attributes() method may be what you are looking for.

A broader set of APIs for cognito can be found here.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMichaDView Question on Stackoverflow
Solution 1 - Amazon Web-ServicesBruce0View Answer on Stackoverflow
Solution 2 - Amazon Web-ServicesunacornView Answer on Stackoverflow
Solution 3 - Amazon Web-ServicesHephaestusView Answer on Stackoverflow