For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/terraform-aws-no-password-policy-enabled.md.
A documentation index is available at /llms.txt.
Ensuring strong AWS IAM password security involves configuring both the password_length and password_reset_required attributes in the aws_iam_user_login_profile resource. Failing to set a sufficient password_length or omitting the password_reset_required = true option, as shown below, can lead to accounts being protected by weak or reused passwords, which increases the risk of unauthorized access.
By requiring users to reset passwords on first use and enforcing adequate password length, as in the following example, organizations can better defend against brute-force attacks and reduce credential compromise risk.