Skip to main content

Command Palette

Search for a command to run...

Boto3 Script to Reset AWS IAM User Passwords

Updated
โ€ข1 min readโ€ขView as Markdown
Boto3 Script to Reset AWS IAM User Passwords
J
Hi there! I'm a Cloud Engineer & SRE, documenting my transition into AI/ML Platform Engineering. I write technical deep-dives, hands-on implementation guides, CLI helper scripts, and visual architectures covering cloud, infrastructure, orchestration, governance, and modern AI runtimes.

Here's a simple boto3 script ๐Ÿ“œ to reset AWS IAM user passwords that I wrote. It's integrated with a password generator tool to match the strict AWS password policy enforced in my environment. It also includes an optional argument to list all current users allowing you to capture the username you need to reset which can help eliminate some back-and-forth Q&A with the requester.

Pain points I was looking to address with this one:

โœ… No more logging into the AWS console UI

โœ… No more crafting the "aws iam update-login-profile โ€ฆ" command

โœ… No more manually generating passwords to match the strict password policy enforced

Link to Script: https://github.com/jksprattler/aws-security/blob/main/scripts/aws_iam_user_password_reset.py

More from this blog

Jenna's Runbooks

24 posts

Documenting cloud operations, developer tooling, and AI infrastructure. Content is organized into four main sections: Platform & AI Infrastructure (runtimes, K8s, kernel tuning), MLOps & Reliability (Terraform IaC, FinOps, security, automation), Cloud Architectures (multi-cloud blueprints & system design), and DevEx (CLI utilities, agentic workflows).