Skip to content

Cognito adminUpdateUserAttributes #5188

Discussion options

You must be logged in to vote

Hi @srinivas-mytend, here is your v2 code converted to v3:

import {
    AdminDisableUserCommand,
    AdminUpdateUserAttributesCommand,
    CognitoIdentityProviderClient
} from "@aws-sdk/client-cognito-identity-provider";

const provider = new CognitoIdentityProviderClient({
    region: "eu-central-1",
    credentials: {
        accessKeyId: "AKIAW5QRNEDNWUG67MM7",
        secretAccessKey: ""
    }
});
const adminChangeEmail = async () => {
    await provider.send(new AdminDisableUserCommand({
        Username: "c27bef38-7e3d-4862-865d-84e4be221b4a",
        UserPoolId: "poolId"
    }));
    await provider.send(new AdminUpdateUserAttributesCommand({
        UserAttributes: [
            {

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by yenfryherrerafeliz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants