DEV Community


Adding Cognito Users with Admin APIs

Howdy, internet stranger. Come have a stay on my page for a bit.
Updated on ・1 min read

After you create a Cognito User Pool, you might want to add a user. You can do that through a mobile client or a webpage. However, it might be more convenient to do so via the CLI:

POOL_ID=us-east-1_x5LZhWMsl # Not real

aws cognito-idp admin-create-user \
    --user-pool-id $POOL_ID \
    --username $USERNAME

aws cognito-idp admin-set-user-password \
    --user-pool-id $POOL_ID \
    --username $USERNAME \
    --password $PASSWORD \

aws cognito-idp admin-confirm-sign-up \
    --user-pool-id $POOL_ID \
    --username $USERNAME 
Enter fullscreen mode Exit fullscreen mode

Discussion (0)