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 Risposte
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
con risposta 2 mesi fa
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.

con risposta 2 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande