Skip to content

deploy --target <name> fails at Persist step: CLI describes stacks for ALL targets, not just the one being deployed #1735

Description

@jesseturner21

Description

agentcore deploy --target <name> fails at the Persist step. The CLI attempts to describe CloudFormation stacks for all configured targets instead of only the target being deployed. If any other target's stack doesn't exist (or isn't relevant to this deploy), the describe fails and the deploy errors out at Persist.

Steps to Reproduce

  1. Configure a project with more than one target (e.g. qa and others) where not every target has a deployed stack.
  2. Run agentcore deploy --target qa.
  3. Observe the failure at the Persist step.

Expected Behavior

Deploying with --target qa should only describe/persist state for the qa target's stack. Other targets should be ignored.

Actual Behavior

The CLI describes stacks for all targets, not just the one passed to --target, causing the Persist step to fail.

CLI Version

0.20.2

Operating System

Linux (WSL2 — 6.18.33.1-microsoft-standard-WSL2, node v22.22.0)

Additional Context

Reported via customer feedback (Aperture form submission).

deploy --target qa fails at Persist step because CLI tries to describe stacks for ALL targets, not just the one being deployed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions