Skip to content

Deploying the same agent in different target regions for the same account fails #1263

@transform-agent

Description

@transform-agent

Description

I have setup an agent harness and added a second target region for the same account. Deployment to the first region succeeds. When deploying to the second region the deployment fails.
When running the CLI in TUI mode, error message is not returned in the UI (but is present in the log).

[09:10:36] Error: CDK deploy failed: ❌  �[1mAgentCore-HarnessTest-eu�[22m failed: DeploymentError: The stack named AgentCore-HarnessTest-eu failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Resource handler returned message: "Resource of type 'AWS::IAM::Role' with identifier 'HarnessTest_MyHarness' already exists." (RequestToken: a67da7f0-e57d-39b6-cd35-f086e9018be4, HandlerErrorCode: AlreadyExists)
[09:10:36] Status: FAILED

Steps to Reproduce

  1. Create a new agent harness
  2. ensure you have two targets in agentcore/aws-targets.json for same account different regions
  3. deploy the agent in one target
  4. deploy the agent in another target

Expected Behavior

Deployment succeeds

Actual Behavior

Deployment fails because IAM role already exists

CLI Version

No response

Operating System

macOS

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions