AWS Command Line Interface
User Guide

Set an Initial Password for an IAM User

This topic describes how to use AWS Command Line Interface (AWS CLI) commands to set an initial password for an IAM user.

Before you run any commands, set your default credentials. For more information, see Configuring the AWS CLI.

The following command uses create-login-profile to set an initial password on the specified user. When the user signs in for the first time, the user is required to change the password to something that only the user knows.

$ aws iam create-login-profile --user-name MyUser --password My!User1Login8P@ssword --password-reset-required { "LoginProfile": { "UserName": "MyUser", "CreateDate": "2018-12-14T17:27:18Z", "PasswordResetRequired": true } }

You can use the update-login-profile command to change the password for an IAM user.

$ aws iam update-login-profile --user-name MyUser --password My!User1ADifferentP@ssword