Description
agentcore deploy checks for a CloudFormation stack named exactly CDKToolkit:
export const CDK_TOOLKIT_STACK_NAME = 'CDKToolkit';
new DescribeStacksCommand({
StackName: CDK_TOOLKIT_STACK_NAME,
});
This breaks in environments where CDK bootstrap infrastructure is deployed centrally, for example through CloudFormation StackSets, which create stack names such as:
StackSet-CDKToolkit-9afdf51a-b1cf-4dfc-9b0c-63ccafe70cbc
The environment is already bootstrapped, but AgentCore still prompts:
Bootstrap AWS environment
In interactive mode, this prompt can be cancelled and deployment continues successfully. In CI/CD, there is no clean equivalent.
Expected behavior
AgentCore should support externally managed bootstrap infrastructure without assuming ownership of it.
A minimal fix would be:
agentcore deploy --skip-bootstrap-check
or a configuration option such as:
{
"bootstrap": {
"management": "external"
}
}
In this mode, AgentCore must not:
- require a stack named
CDKToolkit
- create bootstrap infrastructure
- update existing bootstrap infrastructure
- assume ownership of a detected bootstrap stack
Making the stack name configurable alone is not sufficient, because detection must not imply permission to manage that stack.
Steps to Reproduce
-
Bootstrap an AWS account and region through CloudFormation StackSets
-
Ensure the resulting bootstrap stack has a generated name, for example:
StackSet-CDKToolkit-9afdf51a-b1cf-4dfc-9b0c-63ccafe70cbc
-
Configure AgentCore to deploy to the same account and region.
-
Run:
-
Observe that AgentCore prompts to bootstrap the AWS environment.
-
Cancel the bootstrap prompt.
-
Observe that the deployment continues successfully using the existing bootstrap infrastructure.
Expected Behavior
agentcore deploy should not report that bootstrapping is required when a usable CDK bootstrap environment already exists.
The bootstrap check should not depend exclusively on a CloudFormation stack named exactly CDKToolkit.
AgentCore should also provide a way to mark bootstrap infrastructure as externally managed, ensuring that the CLI does not attempt to create or update it.
Actual Behavior
agentcore deploy checks only for a CloudFormation stack named exactly CDKToolkit.
If the bootstrap infrastructure was provisioned through CloudFormation StackSets and the resulting stack has a generated name, AgentCore reports that the environment needs to be bootstrapped.
In interactive mode, the bootstrap prompt can be cancelled and the deployment continues successfully using the existing bootstrap infrastructure.
CLI Version
No response
Operating System
Linux
Additional Context
No response
Description
agentcore deploychecks for a CloudFormation stack named exactlyCDKToolkit:This breaks in environments where CDK bootstrap infrastructure is deployed centrally, for example through CloudFormation StackSets, which create stack names such as:
The environment is already bootstrapped, but AgentCore still prompts:
In interactive mode, this prompt can be cancelled and deployment continues successfully. In CI/CD, there is no clean equivalent.
Expected behavior
AgentCore should support externally managed bootstrap infrastructure without assuming ownership of it.
A minimal fix would be:
or a configuration option such as:
{ "bootstrap": { "management": "external" } }In this mode, AgentCore must not:
CDKToolkitMaking the stack name configurable alone is not sufficient, because detection must not imply permission to manage that stack.
Steps to Reproduce
Bootstrap an AWS account and region through CloudFormation StackSets
Ensure the resulting bootstrap stack has a generated name, for example:
Configure AgentCore to deploy to the same account and region.
Run:
Observe that AgentCore prompts to bootstrap the AWS environment.
Cancel the bootstrap prompt.
Observe that the deployment continues successfully using the existing bootstrap infrastructure.
Expected Behavior
agentcore deploy should not report that bootstrapping is required when a usable CDK bootstrap environment already exists.
The bootstrap check should not depend exclusively on a CloudFormation stack named exactly CDKToolkit.
AgentCore should also provide a way to mark bootstrap infrastructure as externally managed, ensuring that the CLI does not attempt to create or update it.
Actual Behavior
agentcore deploy checks only for a CloudFormation stack named exactly CDKToolkit.
If the bootstrap infrastructure was provisioned through CloudFormation StackSets and the resulting stack has a generated name, AgentCore reports that the environment needs to be bootstrapped.
In interactive mode, the bootstrap prompt can be cancelled and the deployment continues successfully using the existing bootstrap infrastructure.
CLI Version
No response
Operating System
Linux
Additional Context
No response