DEV Community 👩‍💻👨‍💻


Posted on • Updated on

Adding Cognito Users with Admin APIs

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

Top comments (0)

Join us at DEV Want to join the conversation?

It's easy! Become a DEV member to follow this post, comment, and more.