bug(import): Bedrock Agent import fails on multi-action-group agents and missing gateway proxy Lambda
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- aws, typescript
Direzione di ricerca
Inizia in src/cli/aws/bedrock-import.ts, in fetchActionGroups(), intorno alla riga 218, e segui il percorso di generazione del codice gateway-target. Riproduci importazioni con forme apiSchema string, S3 e missing-payload, quindi esamina il flusso gateway-enabled per la creazione del proxy Lambda. Il lavoro è completato quando entrambe le modalità di importazione gestiscono gli input segnalati senza un’eccezione non gestita e creano il proxy Lambda oppure riportano un errore chiaro e azionabile.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 291
- Fork
- 96
- Merge medio
- 20h 50m
- PR unite (30g)
- 214
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aws/agentcore-cli
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
aws/agentcore-cli#2395 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
aws/agentcore-cli#2392 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
aws/agentcore-cli#2267 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
aws/agentcore-cli#2258 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
aws/agentcore-cli#2176 ·
Tutte le issue di aws/agentcore-cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
receptron/mulmoterminal#2264 ·
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
components-web-app/docs#96 ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
simonsobs/tileviewer#114 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100