DeleteWorkloadIdentity fails with ValidationException

Open
#2,534 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
62/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
backend, cloud

Research direction

Two requests in one issue: start by locating where DeleteWorkloadIdentity is invoked in the AgentCoreCLI codebase and where runtime deletion is handled, to see why linked identities are rejected and where a cascade could hook in. Separately, open the @aws/agentcore-cdk package and find AgentEcrRepository / AgentEcrRepositoryProps to see where the KMS key is hardcoded. Done means a documented deletion path for runtime-owned identities and encryption/encryptionKey props exposed, verified by the package's existing tests or a new one.

Written by the indexing model from the issue text.

Description

DeleteWorkloadIdentity fails with ValidationException 'WorkloadIdentity is linked to a service and cannot be deleted by the caller' for identities created by AgentCore Runtime, and deleting a runtime does not remove its identity, so orphans accumulate with no cleanup path (we have 102). Please cascade deletion with the runtime or allow owner deletion. (2) @aws/agentcore-cdk AgentEcrRepository hardcodes a per-repo customer managed KMS key with enableKeyRotation true and AgentEcrRepositoryProps offers no opt out. ECR AES256 and aws/ecr are free and aws/ecr rotates annually, so this adds USD 1/month per repo plus USD 2/month more after two rotations for no benefit. ECR encryption is immutable after creation so there is no remediation. Please expose encryption and encryptionKey as props. Still present in 0.1.0-alpha.46.

Version: AgentCoreCLI/0.22.0 (darwin 25.5.0; node/v22.13.0)

Dominant language
TypeScript
Stars
339
Forks
129
Avg merge
19h 21m
Merged PRs (30d)
125

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws/agentcore-cli

All issues in aws/agentcore-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.