aws / aws/agentcore-cli

feat(cli): agentcore sync gateway-targets command (SynchronizeGatewayTargets API)

Open
#1,361 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
283
Forks
95
Avg merge
1d 2h
Merged PRs (30d)
183

Description

### Description

The AgentCore control-plane API exposes a `SynchronizeGatewayTargets` action (referenced as the IAM permission required when enabling semantic search at gateway create time — see [gateway-create devguide](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-create.html)). This action forces a refresh of the gateway's tool catalog from all configured targets.

There is **no** corresponding CFN resource or property — CFN models desired-state, not synchronize actions. The CLI also has no surface for it: customers cannot trigger a re-sync after editing target tool definitions or after an upstream OpenAPI/Smithy schema changes.

### Acceptance Criteria

- [ ] Add a new top-level CLI command: `agentcore sync gateway-targets [--gateway ] [--target ]`.
- [ ] Implementation calls the control-plane `SynchronizeGatewayTargets` API for the specified gateway/target.
- [ ] If `--gateway` is omitted, sync all gateways in the project.
- [ ] If `--target` is omitted, sync all targets on the gateway(s).
- [ ] Surface a "Sync targets" action in the TUI gateway detail screen.
- [ ] Optional: hook a sync into `agentcore deploy` post-step when target tool definitions change (gated behind a `--sync-after-deploy` flag).
- [ ] Document the IAM permission required (`bedrock-agentcore:SynchronizeGatewayTargets`).

### Acceptance Criteria — non-goals

- Not in scope: making sync run automatically on every deploy (user opt-in only).
- Not in scope: progress / status streaming during sync (best-effort poll if needed).

### Additional Context

- CFN support: **NO** — `SynchronizeGatewayTargets` is an action, not a CFN resource.
- Control-plane: **YES** — full action exposed.
- The IAM policies the CLI generates already grant `bedrock-agentcore:SynchronizeGatewayTargets` for semantic-search-enabled gateways; this issue extends the surface to manual sync.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.