bug(import): Bedrock Agent import fails on multi-action-group agents and missing gateway proxy Lambda
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- aws, typescript
调研方向
从 src/cli/aws/bedrock-import.ts 中第 218 行附近的 fetchActionGroups() 开始,跟踪 gateway-target 的代码生成路径。使用 string、S3 和 missing-payload 这几种 apiSchema 形状复现导入,然后检查用于创建 proxy Lambda 的 gateway-enabled 流程。完成标准是两种导入模式都能处理报告的输入而不会出现未处理的异常,并且能够创建 proxy Lambda 或报告清晰且可执行的失败信息。
由索引模型根据 Issue 内容生成。
描述
Description
Customers migrating Bedrock Agents to AgentCore via the import-agent flow hit two distinct, reproducible failures. Both were originally reported against the Python starter toolkit (bedrock-agentcore-starter-toolkit), but since the AgentCore CLI (@aws/agentcore) is now the recommended migration tool, we should confirm the equivalent code paths here are correct and covered by tests.
Source: SIM V2200635700 / AWS Support Case 177764821500904 (ELLUCIAN, us-east-1). Agents: BI13NJQLYA (Megamind_Dev), 514OLCKKBT (Crowdstrike), U8V6BP3CRL (Ask_Ellucian, imports fine).
Bug 1 — Action-group translation crashes with 'str' object has no attribute 'get'
Agents with multiple action groups fail to translate even with --disable-gateway. Root cause in the starter toolkit: the code assumes actionGroup["apiSchema"] is always a dict, but the Bedrock Agent API returns it as a raw string for OpenAPI-hosted action groups.
- 0 action groups → imports fine
- 4 action groups → fails
The equivalent CLI path is fetchActionGroups() in src/cli/aws/bedrock-import.ts (~L218), where apiSchema.payload is assumed to be an object. We should verify string / S3 / missing-payload shapes are all handled without throwing.
Bug 2 — Gateway proxy Lambda is never created
With the default (gateway-enabled) migration, CreateGatewayTarget fails with:
ValidationException: Lambda function not found:
arn:aws:lambda:us-east-1:<acct>:function:gateway_proxy_<random>
CloudTrail showed zero CreateFunction calls during import — the tool references a dynamically-named proxy Lambda without ever creating it. Confirm whether the CLI's gateway-target codegen for imported agents creates (or documents the need to create) the proxy Lambda, rather than referencing a name that doesn't exist.
Steps to Reproduce
- Have a Bedrock Agent with 4+ action groups (some using OpenAPI/inline
apiSchema). agentcore import-agent --region us-east-1 --agent-id 514OLCKKBT --agent-alias-id LPPXEL2IK2 --target-platform strands --disable-gateway --output-dir out
→ Bug 1:Failed to translate agent! Error: 'str' object has no attribute 'get'- Run the same import without
--disable-gateway
→ Bug 2:CreateGatewayTarget ... Lambda function not found: gateway_proxy_<random>
Expected Behavior
- Action groups with string / S3 / inline
apiSchemapayloads translate without crashing. - Gateway-enabled import either creates the required proxy Lambda or fails with a clear, actionable message.
Actual Behavior
- Multi-action-group agents crash during translation.
- Gateway import references a non-existent proxy Lambda and fails.
Additional Context
- Bug 1 confirmed independent of gateway (repros with
--disable-gateway). - Bug 2 blocks all default-gateway migrations for this account; IAM perms (
lambda:CreateFunction,lambda:InvokeFunction) verified present. - Starter-toolkit fix for a related symptom shipped in
bedrock-agentcore-starter-toolkit0.3.9 (PR aws/bedrock-agentcore-starter-toolkit#515); customer reported the'str'...error still reproduced after upgrade.
- 主要语言
- TypeScript
- 星标
- 302
- 派生
- 103
- 平均合并
- 20 小时 56 分钟
- 30 天内合并 PR
- 192
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aws/agentcore-cli 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
aws/agentcore-cli#2546 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
aws/agentcore-cli#2538 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
aws/agentcore-cli#2533 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 78/100
aws/agentcore-cli#2520 ·
维护者通常 1 天内回复
-
bug(policy): add policy --target generates an undeployable Cedar statement (wrong action id suffix, resource scope not narrowed)可能已有人在做 @rksharma-owg 于 11 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
aws/agentcore-cli#2395 ·
维护者通常 1 天内回复
查看 aws/agentcore-cli 的全部 Issue
相似的 Issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2
难度 2/5 1-3 小时 新手友好度 72/100
openclaw/openclaw#168089 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
✨ enhancement needs-discussion
难度 1/5 1 小时以内 新手友好度 85/100
-
[Bug]: [MCP/CLI] Bare loopback IP addresses (127.0.0.1:port) and hosts with ports fail to navigate due to erroneous scheme inference可能已有人在做 @alok-108 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/playwright#43263 ·
维护者通常 1 天内回复
-
area:studio type:security
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
enhancement good first issue Stellar Wave trivial
难度 2/5 1-3 小时 新手友好度 85/100
StellarCanary/ProtocolCanary-Action#331 ·
维护者通常 1 天内回复