docs: add harness permissions to IAM policy and permissions guide#1089
docs: add harness permissions to IAM policy and permissions guide#1089notgitika wants to merge 5 commits intoaws:previewfrom
Conversation
Harnesses use imperative deployment (direct API calls, not CDK/CloudFormation), so the developer IAM principal needs harness CRUD + invoke permissions. This was missing, causing E2E harness tests to fail with 403 on CreateHarness. Added bedrock-agentcore:CreateHarness, GetHarness, UpdateHarness, DeleteHarness, ListHarnesses, and InvokeHarness to iam-policy-user.json and PERMISSIONS.md.
|
The new row added to the table at the end of this file is in the wrong section and will likely confuse readers. The contradicts the whole point of the PR (and the prose you just added above it in the "Harness management" section, which correctly says "harness CRUD permissions must be on the developer's IAM principal, not just the CFN execution role"). It also doesn't fit the column header "Resource Type Created" — there is no CFN resource type for harnesses. A few options:
|
Harness permissions belong on the developer principal, not the CFN execution role. The user-policy "Harness management" section already documents these actions correctly.
|
The addition to the That section explicitly says "These permissions are needed on the CloudFormation execution role ( As-is, a reader scoping down their CFN exec role would conclude they need to add these harness actions there, which is wrong (and would also contradict the Options:
|
|
The PR description says |
The harness deployer passes a CDK-created execution role to the CreateHarness/UpdateHarness API, which requires iam:PassRole scoped with iam:PassedToService condition to bedrock-agentcore.amazonaws.com.
- batchEvaluateId → batchEvaluationId (field renamed in API migration) - --lookback → --days for run eval (correct CLI flag) - Tool description recommendation test now expects ValidationException since the test agent has no tool traces (never calls search/calculator)
This reverts commit a86ba70.
Summary
HarnessManagementstatement toiam-policy-user.jsonwith 6 harness actions (CreateHarness,GetHarness,UpdateHarness,DeleteHarness,ListHarnesses,InvokeHarness)PERMISSIONS.mdwith harness management reference section, scoping-down table entry, and CFN execution role referenceHarnesses use imperative deployment (direct API calls, not CDK/CloudFormation), so the developer IAM principal needs these permissions directly. This was missing, causing the E2E harness tests to fail with a 403 on
CreateHarness.Also applied the fix to the
e2e-github-actionsIAM role in our test accunt so the tests pass immediately.Test plan
iam-policy-user.jsonis valid JSONharness-managementinline policy toe2e-github-actionsrole in685197708687harness-bedrock.test.tspasses