aws / aws/agentcore-cli

agentcore init command + portability gaps: aws-targets.json gitignore guidance + CDK re-scaffold support

Open
#1,928 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

I'm not finding an easy way to create a project using agentcore toolkit cli and making it portable. I've found a few gaps such as:

* `aws-targets.json` hardcodes account + region — if you clone the repo elsewhere without it, `agentcore deploy` fails. But the file is environment-specific so it shouldn't be committed with real values.
* `agentcore/cdk/` is auto-generated — if missing, deploy fails ("no CDK project"), but if you run `agentcore create` to regenerate it, it refuses because the directory isn't empty.
There's no `agentcore init` that re-scaffolds just the infrastructure around existing code/config.

It would be very useful to have a way to have portable `agentcore.json` files and a mechanism to recreate the CDK project from scratch. This can also help with updating CDK to newer versions when `agentcore` cli is updated.

### Acceptance Criteria

- An `agentcore.json` created to run in an AWS account can be deployed in a new account with just one command: `agentcore deploy`

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reading the behavior around agentcore.json, aws-targets.json, and the agentcore/cdk/ directory, then trace the agentcore deploy and agentcore create commands. Clarify how re-scaffolding should handle existing code and configuration. Done means the documented acceptance criterion is met: an agentcore.json from one AWS account can deploy in a new account with one agentcore deploy command.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cli, cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.