Loading...
Loading...
Use when deploying your agent to AWS, or when a deploy has failed. Handles pre-flight validation, CDK/IAM/quota error diagnosis, version management, rollback, and canary deployments. Triggers on: "deploy my agent", "agentcore deploy", "deploy failed", "CDK error", "rollback", "canary deploy", "pin version", "redeploy", "deploy stuck". Not for production hardening — use agents-harden. Not for adding capabilities before deploy — use agents-build or agents-connect. Not for VPC configuration errors — use agents-build.
npx skill4agent add aws/agent-toolkit-for-aws agents-deployagentcore deploy$ARGUMENTS/agents-deploy # interactive — pre-flight check or diagnose failure
/agents-deploy preflight # validate config and IAM before deploying
/agents-deploy diagnose # diagnose a failed deploy (paste error or read logs)
/agents-deploy preview # show what deploy will create without deploying
/agents-deploy rollback # roll back to a previous versionagentcore --versionagentcore updateagentcore/agentcore.jsonagentcore/aws-targets.json"Are you:
- About to deploy and want to check everything first
- Dealing with a failed deploy — what error did you see?
- Needing to roll back or pin a specific version?"
references/versioning.mdagentcore deployagentcore validateagentcore.json# Your configured AWS region
aws configure get region
# The region in your deployment target
cat agentcore/aws-targets.json
# The account you're actually authenticated as
aws sts get-caller-identityregionaws-targets.jsonaws configureaccountsts get-caller-identityaws bedrock list-foundation-models --region $(aws configure get region) \
--query 'modelSummaries[?modelLifecycle.status==`ACTIVE`].modelId' \
--output tableus.eu.apac.global.global.global.anthropic.claude-sonnet-4-5-20250929-v1:0eu.agentcore deploy --dry-run
agentcore deploy --diff--dry-run--diffaws iam simulate-principal-policy \
--policy-source-arn $(aws sts get-caller-identity --query Arn --output text) \
--action-names iam:CreateRole \
--resource-arns "arn:aws:iam::*:role/*BedrockAgentCore*"agentcore deploy -y # auto-confirm (alias: agentcore dp -y)
agentcore deploy -y -v # verbose — shows resource-level events
agentcore deploy --target staging -y # deploy to a specific targetagentcore status --type memory# View recent deploy logs
ls -lt agentcore/.cli/logs/
cat agentcore/.cli/logs/deploy-*.log 2>/dev/null | tail -100User: arn:aws:iam::123456789012:user/dev is not authorized to perform: iam:CreateRole*BedrockAgentCore*This stack uses assets, so the toolkit stack must be deployed to the environmentnpx cdk bootstrap aws://<YOUR_ACCOUNT_ID>/<REGION>no basic auth credentials
Error response from daemon: Head "https://<YOUR_ACCOUNT_ID>.dkr.ecr.<REGION>.amazonaws.com/..."aws ecr get-login-password --region <REGION> | \
docker login --username AWS --password-stdin <YOUR_ACCOUNT_ID>.dkr.ecr.<REGION>.amazonaws.comValidationException: The provided model identifier is invalidagentcore.jsonStack ... is in region us-east-1 but the target is us-west-2agentcore/aws-targets.jsonaws configureaws configure set region <REGION>Memory resource is in CREATING state after 10 minutesagentcore status --type memory --jsonLimitExceededException: Account limit for AgentCore runtimes exceededagentcore deploy -yagentcore statusagentcore status
agentcore status --state pending-removal # resources marked for deletionagentcore/aws-targets.json[
{
"name": "staging",
"description": "Staging environment",
"account": "123456789012",
"region": "us-east-1"
},
{
"name": "production",
"description": "Production environment",
"account": "987654321098",
"region": "us-west-2"
}
]agentcore deploy --target staging -y
agentcore deploy --target production -y