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 réponses
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
répondu il y a 2 mois
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.

répondu il y a 2 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions