Commit 6f34350
fix(docs): document lambda:InvokeFunction for code-based evaluators (#1891)
`run eval` against a code-based evaluator fails with AccessDeniedException
for callers using the documented user policy:
Access denied when invoking Lambda function: ... User: ... is not
authorized to perform: lambda:InvokeFunction on resource:
arn:aws:lambda:...:function:<Agent>-eval-<evaluator>
`bedrock-agentcore:Evaluate` invokes the evaluator's Lambda under the
*caller's* identity, so the caller needs `lambda:InvokeFunction`. A
resource-based policy on the function alone does not cover it.
Neither iam-policy-user.json nor the PERMISSIONS.md Evaluation table
granted or mentioned it, because until the DeepEval/Autoevals tests
added in #1828 every eval path exercised was either `Builtin.*` or
`llm-as-a-judge` -- neither of which touches Lambda.
Scoped to `arn:*:lambda:*:*:function:*-eval-*` (partition wildcard per
the multi-partition rules in AGENTS.md) rather than `*`.
The same statement was added to the e2e-github-actions CI role, which
had no lambda:InvokeFunction on any of its 9 policies -- that is what
broke e2e shard 5 on main:
https://github.com/aws/agentcore-cli/actions/runs/30663047263/job/91263525976
Co-authored-by: jariy17 <tjariy+jariy17@users.noreply.github.com>1 parent 8fba816 commit 6f34350
2 files changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| 384 | + | |
384 | 385 | | |
385 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
386 | 393 | | |
387 | 394 | | |
388 | 395 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
59 | 65 | | |
60 | 66 | | |
61 | 67 | | |
| |||
0 commit comments