For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/cloudformation-aws-iam-password-without-minimum-length.md.
A documentation index is available at /llms.txt.
IAM user console passwords defined in AWS CloudFormation should be strong to reduce the risk of account compromise through brute force, credential stuffing, or simple credential reuse. For AWS::IAM::User resources, Properties.LoginProfile.Password must be a string with a minimum length of 14 characters. Passwords shorter than 14 characters will be flagged unless they reference a secret via an AWS Secrets Manager dynamic reference. Avoid embedding plaintext passwords in templates. Instead, reference secrets stored in AWS Secrets Manager or SSM Parameter Store, or rely on IAM-managed workflows and password policies.
Secure example with a sufficiently long password (or a secret reference) in CloudFormation: