Menu

1 / 5

Stop Hand-Writing Least-Privilege IAM Policies: Policy Sentry + Parliament (and the KMS Trap)

DEV Community: aws·Chikara Inohara·about 7 hours ago
#qWuxQxwa
#devtoaws#devto#dev#policy#resource
Long article (1194 words) — no AI summary yet.
Reading 0:00
15s threshold

Lately I've been doing IAM security remediation at work, and I keep running into policies like "Action": "s3:*" , "Resource": "*" .

Everyone agrees on "least privilege", but writing it by hand is painful:

figuring out which actions you actually need takes forever

once it's written, you're never quite sure it's really minimal

a typo won't show up until terraform apply (or production)

So I tried two tools that let you stop hand-writing policies :

Tool What it does

Policy Sentry Generates a least-privilege policy from "which ARNs do I read / write"

Parliament Lints a policy (typos, unnecessary * , resource mismatches)

Both run offline, without an AWS account , so they're easy to try locally.

All screenshots in this post are real command output from my Linux box.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.