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 Antworten
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
beantwortet vor 2 Monaten
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.

beantwortet vor 2 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen