aws / aws/bedrock-agentcore-starter-toolkit

[BUG] agent build fails when agent name changes

Open
#337 0 comments 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**
If you run 'agentcore configure -e ...' and deploy and agent, then later run agentcore configure again but change the name of the agent, and attempt to reuse the same ECR repository, the build will fail. It seems the IAM role for the build is restricted to the repository name, and the repository name is tied to the agent name. So either 1/ don't allow agent name change or 2/ if agent name changes, don't allow user to try to re-use existing ECR repository, or 3/ make repository name and IAM role slightly more general (maybe based on endpoint name not agent name)

**To Reproduce**
Steps to reproduce the behavior:
agentcore configure -e agent.py
agentcore launch
agentcore configure -e agent.py
(use different agent name and existing ECR repository)
agentcore launch

**Expected behavior**
Either an error message at configure time or success at launch

**Error Output**
❌ Launch failed: An error occurred (AccessDeniedException) when calling the
CreateAgentRuntime operation: {"message":"The IAM role ARN format is invalid.
Please provide a role with valid ARN.:. Try providing one of the valid formats:
[^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/(service-role/)?{1,64}$]"}

**Environment:**
- OS: [e.g. Ubuntu 22.04, macOS 13.0, Windows 11]
- Python version: [e.g. 3.10.5]
- Package version: [e.g. 0.1.0]
- Installation method: [pip, conda, from source]

**Additional context**

Contributor guide

Open the contributing guide

Research direction

Reproduce the sequence of agentcore configure and agentcore launch commands with a changed agent name and reused ECR repository. Trace how configure records the agent and repository names and how launch creates or uses the IAM role. Done means the workflow either fails with a clear configure-time error or launches successfully after the name change.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
authorization, 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.