-
Notifications
You must be signed in to change notification settings - Fork 124
Description
Describe the bug
We looked through the utility of import-agent and tried to migrate agents.
I was able to migrate simple agents but the moment I went on to enable "gateway", it started throwing errors.
It was trying to create the gateway and failing while creating a lambda function or was looking for a lambda function whose name included "gateway_proxy". The error was something like the following:
Observability enabled for gateway/history-agent-gateway-c7a5c-gdsoorkeli - logs: True, traces: True 2026-02-19 18:17:07,265 - bedrock_agentcore.gateway - INFO - ✅ Observability enabled for gateway history-agent-gateway-c7a5c-gdsoorkeli 2026-02-19 18:17:07,266 - bedrock_agentcore.gateway - INFO - Log group: /aws/vendedlogs/bedrock-agentcore/gateway/APPLICATION_LOGS/history-agent-gateway-c7a5c-gdsoorkeli 2026-02-19 18:17:18,358 - bedrock_agentcore.gateway - INFO - Creating Target 2026-02-19 18:17:18,358 - bedrock_agentcore.gateway - INFO - {'gatewayIdentifier': 'history-agent-gateway-c7a5c-gdsoorkeli', 'name': 'history-actions', 'targetConfiguration': {'mcp': {'lambda': {'lambdaArn': 'arn:aws:lambda:us-west-2:019598935558:function:gateway_proxy_02e1b907', 'toolSchema': {'inlinePayload': [{'name': 'history_actions_gethistoricalinfo', 'description': 'Get historical information about events, figures, or periods\\nThis tool is part of the group of tools called history_actions.', 'inputSchema': {'type': 'object', 'properties': {'query': {'type': 'string', 'description': 'The historical query'}}, 'required': ['query']}}]}}}}, 'credentialProviderConfigurations': [{'credentialProviderType': 'GATEWAY_IAM_ROLE'}]} ╭──────────────────────────────────────────────────── Translation Error ─────────────────────────────────────────────────────╮ │ Failed to translate agent! │ │ Error: An error occurred (ValidationException) when calling the CreateGatewayTarget operation: Lambda function not found: │ │ arn:aws:lambda:us-west-2:019598935558:function:gateway_proxy_02e1b907. Verify the function ARN is correct and retry. │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
To Reproduce
Steps to reproduce the behavior:
- Install package with 'agentcore starter toolkit'
- Run command 'agentcore import-agent' in cli, with --disable-code-interpreter flag
- See error
Expected behavior
Bedrock agent should be migrated to agentcore runtime with action groups translated to gateway targets
Error Output
Pasted as part of description
Environment:
- OS: [e.g. Ubuntu 22.04, macOS 13.0, Windows 11]: macOs 13.0
- Python version: [e.g. 3.10.5] 3.14
- Package version: [e.g. 0.1.0] latest
- Installation method: [pip, conda, from source] npm, pip
Additional context
Add any other context about the problem here.