Table Of Contents


User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . cognito-idp ]



Gets the specified user by user name in a user pool as an administrator. Works on any user.

Requires developer credentials.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.


--user-pool-id <value>
--username <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]


--user-pool-id (string)

The user pool ID for the user pool where you want to get information about the user.

--username (string)

The user name of the user you wish to retrieve.

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.


To get a user

This example gets information about username


aws cognito-idp admin-get-user --user-pool-id us-west-2_aaaaaaaaa --username


  "Username": "4320de44-2322-4620-999b-5e2e1c8df013",
  "Enabled": true,
  "UserCreateDate": 1548108509.537,
  "UserAttributes": [
          "Name": "sub",
          "Value": "4320de44-2322-4620-999b-5e2e1c8df013"
          "Name": "email_verified",
          "Value": "true"
          "Name": "phone_number_verified",
          "Value": "true"
          "Name": "phone_number",
          "Value": "+01115551212"
          "Name": "email",
          "Value": ""
  "UserLastModifiedDate": 1548108509.537


Username -> (string)

The user name of the user about whom you are receiving information.

UserAttributes -> (list)

An array of name-value pairs representing user attributes.


Specifies whether the attribute is standard or custom.

Name -> (string)

The name of the attribute.

Value -> (string)

The value of the attribute.

UserCreateDate -> (timestamp)

The date the user was created.

UserLastModifiedDate -> (timestamp)

The date the user was last modified.

Enabled -> (boolean)

Indicates that the status is enabled.

UserStatus -> (string)

The user status. Can be one of the following:

  • UNCONFIRMED - User has been created but not confirmed.
  • CONFIRMED - User has been confirmed.
  • ARCHIVED - User is no longer active.
  • COMPROMISED - User is disabled due to a potential security threat.
  • UNKNOWN - User status is not known.
  • RESET_REQUIRED - User is confirmed, but the user must request a code and reset his or her password before he or she can sign in.
  • FORCE_CHANGE_PASSWORD - The user is confirmed and the user can sign in using a temporary password, but on first sign-in, the user must change his or her password to a new value before doing anything else.

MFAOptions -> (list)

Specifies the options for MFA (e.g., email or phone number).


Specifies the different settings for multi-factor authentication (MFA).

DeliveryMedium -> (string)

The delivery medium (email message or SMS message) to send the MFA code.

AttributeName -> (string)

The attribute name of the MFA option type.

PreferredMfaSetting -> (string)

The user's preferred MFA setting.

UserMFASettingList -> (list)

The list of the user's MFA settings.