IAM password policies must permit users to change their own passwords so compromised, expired, or weak credentials can be rotated and account recovery workflows remain effective. In Ansible tasks using the amazon.aws.iam_password_policy or iam_password_policy modules, the boolean property controlling this must be defined and set to true — either allow_pw_change or allow_password_change depending on module version.
Tasks that omit these properties or set them to false/no are flagged because disabling password changes prevents credential rotation and hampers incident response and account hygiene.
Secure Ansible example:
- name:Ensure IAM password policy allows user password changesamazon.aws.iam_password_policy:allow_password_change:true
Compliant Code Examples
- name:Password policy for AWS accountamazon.aws.iam_password_policy:state:presentmin_pw_length:8require_symbols:falserequire_numbers:truerequire_uppercase:truerequire_lowercase:trueallow_pw_change:truepw_max_age:60pw_reuse_prevent:5pw_expire:false
Non-Compliant Code Examples
- name:Password policy for AWS accountamazon.aws.iam_password_policy:state:presentmin_pw_length:8require_symbols:falserequire_numbers:truerequire_uppercase:truerequire_lowercase:trueallow_pw_change:falsepw_max_age:60pw_reuse_prevent:5pw_expire:false- name:Alias Password policy for AWS accountamazon.aws.iam_password_policy:state:presentmin_pw_length:8require_symbols:falserequire_numbers:truerequire_uppercase:truerequire_lowercase:trueallow_password_change:falsepw_max_age:60pw_reuse_prevent:5pw_expire:false
1
2
rulesets:- Ansible / AWS # Rules to enforce / AWS.
맞춤형 데모 요청
Datadog 시작하기
Ask AI
AI-generated responses may be inaccurate. Verify important info.