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

前端 未结 2 455
庸人自扰
庸人自扰 2021-02-04 23:51

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 p

2条回答
  •  南笙
    南笙 (楼主)
    2021-02-05 00:20

    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
    

提交回复
热议问题