Accessing Cognito custom attributes from a lambda function

0

Using the CLI I can update a Cognito custom attribute using 'aws cognito-idp admin-update-user-attributes'. I am looking to implement this functionality from a lambda function, both for reading and updating the attribute. Specifically I am looking for detailed instructions or sample code that would help me accomplish this.

2 回答
1

You didn't state what language you wanted examples for, but here is some documentation and code samples for how you might implement this in python and boto3.

response = client.admin_update_user_attributes(
    UserPoolId='string',
    Username='string',
    UserAttributes=[
        {
            'Name': 'string',
            'Value': 'string'
        },
    ],
    ClientMetadata={
        'string': 'string'
    }
)
profile pictureAWS
已回答 2 个月前
0

Thanks for the quick response. Python works for me, but I'm pretty new to AWS and will need more guidance on this code sample. The first question is how to import the 'client' package. Then I would probably have questions on how to add this to a Lambda function.

已回答 2 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则