In this blog, we'll learn how to change the password of an IAM user in AWS using console and AWS CLI.
AWS IAM (Identity and Access Management) is a service that manages the access-related operations, such as creating users and groups, configuring permissions, and managing login credentials.
iam:UdateLogingProfile
permission or has the admin privileges only can do it. So if you are not an admin, contact the admin or who has privileges to reset the password.Reset AWS IAM User Password
There are two methods to reset the IAM user password.
- From AWS console
- Use the CLI
Method 1: Resetting Password from AWS Console
Log in to the AWS console as a privileged or admin user.
Open the IAM dashboard and click to open the Users
tab from the left side panel under the Access management.

Select the user for whom you want to reset the password.
On the next page, select the Security credentials
tab

Selec the Manage console access
tab from the "Console sign-in" section.

On the next page, choose Reset password
and select the Autogenerated password
To create a temporary password, also allow the user to log in with it and reset their password to the intended one.

Share the temporary credentials to the user to login.

The user will be prompted to set a new password on their first login.
Method 2: Reset IAM User Password Using the AWS CLI
Here, the CLI also has to be configured with the admin credentials, such as Secret Key and Secret Access Key.

To reset the password from the CLI, use the following command.
aws iam update-login-profile \
--user-name <IAM_USER_NAME> \
--password <NEW_PASSWORD> \
--password-reset-required
Replace the <IAM_USER_NAME>
and <NEW_PASSWORD>
with the actual values.
Note: To avoid the security breaches, always use a password rotation policies, enable MFA, monitor user activities using CloudTrail and mainly not providing admin credentials.