IAM Password Policies

An IAM Password Policy in AWS defines the rules and requirements for how IAM users create and manage their passwords. It helps enforce strong security practices by requiring complexity, expiration, and rotation policies.

Why Use IAM Password Policies

  • Prevent weak passwords that are easy to guess.

  • Ensure compliance with security standards

  • Reduce the risk of brute force and credentials-stuffing attacks.

  • Enforce regular password updates and multi-factor authentication (MFA).

Key Features of IAM Password Policies

AWS IAM password policies let you:

  • Set minimum password length (at least 8 characters)

  • Require character complexity (uppercase, lowercase, numbers, symbols).

  • Enable password expiration (force password changes after a specific time).

  • Prevent Password reuse(restrict reusing old passwords).

  • Allow users to change their password(self-service).

  • Enforce multi-factor authentication (MFA) for better security.

Default AWS Password Policy

By default, AWS does not enforce a strict password policy.

  • This means that IAM users can create weak passwords unless and admin enforces stricter rules.

Configuring an IAM Password Policy

Method 1: Using AWS Management Console (GUI)

Steps to configure IAM Password Policy

  1. Sign in to AWS Management Console

  2. In the left Panel, Select Account settings.

  3. Scroll down to password policy and click edit.

  4. Set the password policy rules.

  5. Click save changes.


Method 2: Using AWS CLI

You can also set an IAM password policy using the AWS CLI.

Example,

$ aws iam update-account-password-policy  \
--minimum-password-length '12'  \
--require-uppercase-characters  \
--require-lowercase-characters  \
--require-numbers  \
--require-numbers  \
--requires-symbols  \
--password-reuse-prevention '5'  \
--max-password-age '90'  \
--allow-users-to-change-password



Checking Current IAM Password Policy

To view the current password Policy, run

$ aws iam get-account-password-policy


Deleting an IAM Password Policy


If you need to remove the password policy:

$ aws iam delete-account-password-policy