Commit e791e62
committed
fix(screenshot): krokoko PR-241 review — scope IAM + cosmetic Vercel mention
Closes aws-samples#94 (the existing 'scope IAM down from bedrock-agentcore:*'
followup task).
Addresses krokoko's PR aws-samples#241 review:
1. (BLOCKING per review #1) IAM action wildcard — narrow
bedrock-agentcore:* to the three calls the screenshot processor
actually makes:
- StartBrowserSession (control plane, public CLI command)
- StopBrowserSession (control plane, public CLI command)
- ConnectBrowserAutomationStream (SigV4-presigned WSS dial; not
in the public CLI list but verified live against the deployed
dev stack — IAM accepts the action name)
Resource wildcard remains because AgentCore Browser sessions are
ephemeral with no stable ARN; the IAM5 suppression on the construct
already documents that.
Previous behaviour granted every AgentCore action surface (memory,
runtime, gateway, identity, code-interpreter) the screenshot path
doesn't use. Tightening to the call set leaves a precise audit
surface; if a future API change needs another action, IAM denies
with the action name in CloudTrail and we add it explicitly.
2. (NIT per review aws-samples#7) Stale 'Vercel' wording on ScreenshotBucketName
CfnOutput description, plus an adjacent comment in agent.ts that
said 'Vercel-style preview deploys'. Both replaced with
provider-agnostic phrasing — the pipeline listens for any provider
that posts deployment_status (Vercel, Amplify, Netlify, GitHub
Actions custom CD).
No behavioural change in either fix.1 parent 8c8b7e3 commit e791e62
2 files changed
Lines changed: 29 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
194 | 206 | | |
195 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
196 | 212 | | |
197 | 213 | | |
198 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
836 | 836 | | |
837 | 837 | | |
838 | 838 | | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
844 | 845 | | |
845 | 846 | | |
846 | 847 | | |
| |||
864 | 865 | | |
865 | 866 | | |
866 | 867 | | |
867 | | - | |
| 868 | + | |
868 | 869 | | |
869 | 870 | | |
870 | 871 | | |
| |||
0 commit comments