Build1 distinct publisher3 min readUpdated
A developer audited the IAM policy on his own Bedrock agent and found one statement scoped to a single secret and another that reaches every Claude model, in every region Bedrock runs.
The Engineer · Build desk

Compiled by The EngineerSomething wrong?How this is made
A developer published the IAM policy from his own Bedrock agent, read it line by line, and found that half of it did not meet his own standard [2]. That is worth studying because the loose half looks like the tight half at a glance: two statements, two actions, no wildcard in any Action field, nothing that would stop a reviewer skimming for admin verbs [18].
The role, according to Mario Gongora writing on dev.to, backs an agent that does two things: it reads one secret from Secrets Manager, and it invokes a Claude model on Bedrock to write a daily report [1]. The first statement allows `secretsmanager:GetSecretValue` on `arn:aws:secretsmanager:us-east-1:111122223333:secret:solar-daily-brief/config-*` [3]. The trailing `-*` there is not a hedge. Secrets Manager appends a random suffix to every secret ARN, so that wildcard resolves to exactly one resource that exists [4].
The second statement allows `bedrock:InvokeModel` on two ARNs: `arn:aws:bedrock:*::foundation-model/anthropic.claude-*` and `arn:aws:bedrock:us-east-1:111122223333:inference-profile/us.anthropic.claude-*` [5]. Here the wildcards do work nobody asked for. `anthropic.claude-*` matches every Claude model within the account's reach rather than the one model the code calls [6], which in practice means Claude 3, Claude 3.5, Claude 3.7, Opus, and any future model that happens to match the prefix [9]. The foundation-model ARN also opens with `bedrock:*::`, a region wildcard [7]. Foundation-model ARNs are not account-scoped, taking the form `arn:aws:bedrock:REGION::foundation-model/MODEL-ID`, so `bedrock:*::` is how people quietly grant a model in every region Bedrock runs, not only the `us-east-1` the agent actually calls [8]. Two independent wildcards on one ARN means the permitted set is a cross product: regions where Bedrock is available, multiplied by Claude models matching the prefix [19].
The code settles what memory could not. Gongora reports that `deye_client.py` and `collector.py` make exactly one `get_secret_value()` call against one secret name, resolved at startup and cached for the process lifetime [10], and that the report step calls `bedrock-runtime.invoke_model()` with a single model ID read from config, not a family and not a runtime choice [11]. No path in the project needs a second secret or a second model [12]. His diagnosis of how the gap opened is worth quoting in substance: writing IAM by intuition feels faster than writing it from evidence, so you grant roughly what the code does and round up to be safe [13]. The Bedrock wildcard specifically was meant as a hedge against changing model versions [14].
The prescribed fix is unglamorous and cheap: pin the resource to the specific model ID or inference profile the config already names, and accept that a model upgrade later costs a one-line policy change [15]. That is the same trade the Secrets Manager statement makes for free, and the same reason adding a second secret next year should grow the policy by one line rather than by a wildcard covering whatever else lands in that account [17]. The general method he recommends is to open the code, list every AWS API call, note the exact resource each call touches, and write the policy from that list rather than from an SDK doc example [16].
The tell to look for in your own policies is an ARN with an empty account field, because a resource type that is not account-scoped will not fail closed for you [8]. The second tell is a wildcard standing in for a version or a model generation rather than for a suffix the service generates [4][9]. Whether the pinned version of this policy actually ships, and how much friction the next model upgrade creates, is the part that decides if the discipline holds.
Follow any of these and your For You feed starts watching them — no settings page required.
Ranked by verification strength, evidence, and original report placement.
The role backs an agent that does two things: it reads one secret from Secrets Manager, and it invokes a Claude model on Bedrock to write a daily report.
The author wrote the IAM policy himself on the first try, believed he had done it right, and on re-reading it line by line found that he had not, entirely.
The first statement, Sid SecretsManagerReadConfig, has Effect Allow, Action secretsmanager:GetSecretValue, and Resource arn:aws:secretsmanager:us-east-1:111122223333:secret:solar-daily-brief/config-*
The trailing -* in the secret ARN only covers the random suffix Secrets Manager appends to every ARN, so that statement grants access to exactly one thing that exists.
The second statement, Sid BedrockInvokeModel, allows Action bedrock:InvokeModel on two resources: arn:aws:bedrock:*::foundation-model/anthropic.claude-* and arn:aws:bedrock:us-east-1:111122223333:inference-profile/us.anthropic.claude-*
anthropic.claude-* matches every Claude model in the account's reach, not the one model the code actually calls.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Specific artifacts, single self-reported source
The strongest evidence is primary and quotable: the full policy JSON is reproduced, and the wildcard readings follow directly from the ARN strings shown. Weakening it, the code inventory (one cached get_secret_value(), one invoke_model() with a config-supplied model ID) is asserted rather than shown, the CloudTrail verification is described but the supplied text is truncated before any query output, and everything comes from one publisher and one author who wrote both the code and the policy he is auditing.
One self-reported hobby deployment
The only adoption signal is the author's own running agent and its live role policy — a single-developer Bedrock deployment in us-east-1. No other users, teams, organisations, or tooling adopting the described policy-from-code practice appear in the supplied material, so the observed footprint is minimal.
Slightly understated
The framing is self-critical and calibrated: the author distinguishes the tight Secrets Manager statement from the loose Bedrock one, explicitly says the region wildcard is partly a property of the ARN format rather than pure sloppiness, and names the cost of the fix. If anything the piece undersells its own generality — the same wildcard pattern likely recurs wherever teams copy example Bedrock policies — while claiming only that removing it 'removes real blast radius' without asserting any exploitation.
Personal series credibility, no vendor stake evident
The post is a developer blog entry on dev.to that explicitly builds on 'the last article' in the author's own series, so there is an audience-building incentive to produce a tidy lesson and a narrative reason to confirm that the previously described sts:SetSourceIdentity trust policy 'does exactly what I said it would'. Against that, the supplied text shows no vendor sponsorship, product being sold, or commercial ask, and the piece's main move is admitting the author's own mistake.
Internally verifiable, externally uncorroborated
Confidence is moderate: the wildcard findings are checkable against the quoted policy and standard AWS ARN semantics, which makes the core claims hard to get wrong. But the cluster has one source and one publisher, the code inventory and CloudTrail results are unverified, and there is no independent review of the author's reading of inference-profile versus foundation-model grants.
build
Fanatics Betting's multi-agent support build: the axis that matters is the state line1 distinct publisher
build
Bedrock turns GPT-5.6 throughput into a routing choice, with residency as the price1 distinct publisher
build
DynamoDB vector indexes remove the second datastore, and the GSI permutation trap with it1 distinct publisher
build
Two mechanisms, one vCPU floor: why db.t3.micro cannot meet a 1-second RPO on RDS1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 15, 2026