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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ