aws / aws/bedrock-agentcore-starter-toolkit

Import-agent gateway creation failed with lambda (ValidationException) when calling the CreateGatewayTarget operation

Open
#462 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
508
Forks
155
Avg merge
8h 50m
Merged PRs (30d)
4

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:
1. Install package with 'agentcore starter toolkit'
2. Run command 'agentcore import-agent' in cli, with --disable-code-interpreter flag
3. 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.

Contributor guide

Open the contributing guide

Research direction

Start with the `agentcore import-agent` CLI path and reproduce the failure using the command and `--disable-code-interpreter` flag described in the issue. Trace gateway target creation and the referenced Lambda ARN; done means action groups migrate successfully to gateway targets without the CreateGatewayTarget ValidationException.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cli, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.