Developer Shows How IAM Least-Privilege Policies Silently Drift Into Overpermission
A developer building an AWS-based solar reporting agent discovered that the IAM policy they wrote for their project granted broader permissions than intended, despite believing it was correctly scoped. The agent only needed to read one Secrets Manager secret and invoke a single Claude model on Bedrock, yet the Bedrock policy statement used a wildcard that matched every Claude model available in the account across all regions. The author traced the root cause to writing policies from intuition and general knowledge rather than directly inspecting the source code for exact API calls and resource ARNs. They recommend auditing every AWS API call in the codebase, identifying the precise resource each call targets, and constructing the policy strictly from that evidence. The Secrets Manager statement — one action, one exact ARN — is cited as the correct model, while the looser Bedrock statement illustrates how small lapses in discipline produce policies that only appear to follow least-privilege principles.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in