Commit 1f6a2f2
committed
feat(payments): grant runtime role payment data-plane perms + system prompt update
The deployed agent runtime role was missing every Get/List/Create payment
instrument+session action and ProcessPayment. The L3 stack only granted
sts:AssumeRole on the ProcessPaymentRole, which carries only
ProcessPayment — and the SDK plugin's auto-pay path calls
GetPaymentInstrument on the runtime's own credentials before any role
assumption. Without this grant the plugin fails with AccessDeniedException
on the very first 402 it tries to settle.
Add the seven required actions to the runtime role's inline policy in
the vended CDK stack template (src/assets/cdk/lib/cdk-stack.ts). Scoped
to the manager ARN.
Also update PAYMENT_SYSTEM_PROMPT in the Strands payments capability to
mention the http_request tool, which the AgentCorePaymentsPlugin now
provides automatically (see SDK PR
aws/bedrock-agentcore-sdk-python#493). The other prompt lines for
get_payment_session / get_payment_instrument_balance /
list_payment_instruments are unchanged — those tools were already
provided by the plugin.
Snapshot updated to reflect the cdk-stack.ts addition.1 parent c31e6d7 commit 1f6a2f2
3 files changed
Lines changed: 54 additions & 2 deletions
File tree
- src/assets
- __tests__/__snapshots__
- cdk/lib
- python/http/strands/capabilities/payments
Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
412 | 438 | | |
413 | 439 | | |
414 | 440 | | |
| |||
5399 | 5425 | | |
5400 | 5426 | | |
5401 | 5427 | | |
5402 | | - | |
| 5428 | + | |
5403 | 5429 | | |
5404 | 5430 | | |
5405 | 5431 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
137 | 163 | | |
138 | 164 | | |
139 | 165 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
0 commit comments