Skip to content

Commit fbf0de0

Browse files
isadeksclaude
andcommitted
fix(iam): grant bedrock-agentcore:* to the screenshot processor
The minimal IAM I shipped earlier (`StartBrowserSession`, `StopBrowserSession`, `GetBrowserSession`, `UpdateBrowserStream`) wasn't enough — the WSS automation-stream connect requires an additional `ConnectBrowserAutomationStream`-flavored action that isn't in the public CLI command list. Lambda invocations were opening sessions cleanly but 403'ing on the WSS upgrade. Widen to `bedrock-agentcore:*` to unblock the e2e flow. Followup: scope back down to the specific connect action once it's documented or surfaced via CloudTrail decoded-message-on-deny. Smoke verified: PR #1 on isadeks/vercel-abca-linear now receives a screenshot comment within ~7s of the deployment_status webhook. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e1ac8b0 commit fbf0de0

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

cdk/src/constructs/github-screenshot-integration.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,15 @@ export class GitHubScreenshotIntegration extends Construct {
149149
this.screenshotBucket.bucket.grantPut(this.webhookProcessorFn);
150150
props.githubTokenSecret.grantRead(this.webhookProcessorFn);
151151

152-
// AgentCore Browser session lifecycle. The data-plane API doesn't
153-
// support per-resource ARNs (sessions are ephemeral), so wildcards
154-
// are required — annotated with a cdk-nag suppression below.
152+
// AgentCore Browser session lifecycle + automation-stream connect.
153+
// The data-plane API doesn't support per-resource ARNs (sessions
154+
// are ephemeral), so wildcards are required — annotated with a
155+
// cdk-nag suppression below. The wildcard set covers
156+
// `ConnectBrowserAutomationStream` (the SigV4-presigned WSS dial)
157+
// which lives under the same prefix but isn't visible in the
158+
// public CLI command list.
155159
this.webhookProcessorFn.addToRolePolicy(new iam.PolicyStatement({
156-
actions: [
157-
'bedrock-agentcore:StartBrowserSession',
158-
'bedrock-agentcore:StopBrowserSession',
159-
'bedrock-agentcore:GetBrowserSession',
160-
'bedrock-agentcore:UpdateBrowserStream',
161-
],
160+
actions: ['bedrock-agentcore:*'],
162161
resources: ['*'],
163162
}));
164163

0 commit comments

Comments
 (0)