npx skills add ...
npx skills add aws/agent-toolkit-for-aws --skill agents-deploy
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 skills add aws/agent-toolkit-for-aws --skill agents-deploy
Deploy your AgentCore agent to AWS, or diagnose why a deploy failed.
agentcore deploy failed with an error$ARGUMENTS is optional:
Run agentcore --version. This skill requires v0.9.0 or later. If the version is older, tell the developer to run agentcore update before proceeding.
Read agentcore/agentcore.json and agentcore/aws-targets.json if they exist.
Ask (or infer from context):
"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?"
If the developer needs versioning, rollback, or canary deployment, load references/versioning.md and follow its instructions.
Run these checks before agentcore deploy:
Show the developer this command to run:
This catches malformed agentcore.json before CDK even starts.
The most common deploy failure is a region mismatch. Show the developer these commands to verify:
The region in aws-targets.json must match your aws configure default region. The account must match the account ID from sts get-caller-identity.
Show the developer this command to check enabled models in their region:
Cross-region inference profile IDs use a geographic prefix (us., eu., apac.) or global. to control where inference runs. The CLI scaffolds global. by default (e.g., global.anthropic.claude-sonnet-4-5-20250929-v1:0), which routes to any commercial region. Geographic prefixes keep inference within that geography (e.g., eu. stays in EU regions). All prefixes require model access enabled in every destination region the profile covers. Check the Bedrock docs for which regions are included in each profile prefix.
--dry-run shows what resources will be created. --diff shows the CDK diff against what's currently deployed.
Show the developer the permissions needed and this verification command:
Memory provisioning note: If your project includes memory, deploy takes 2–5 minutes longer while the memory resource becomes ACTIVE. This is normal — not an error. Check status:
If the developer pasted an error, diagnose it directly. If not, read the deploy logs:
IAM permission error:
Fix: Attach the required IAM permissions (see Check 5 above). The deploying identity needs IAM write access scoped to *BedrockAgentCore* roles.
CDK bootstrap not run:
Fix:
ECR authorization error:
Fix:
Model access denied during deploy:
Fix: Enable the model in the Bedrock console → Model access. Ensure the model ID in agentcore.json matches an enabled model in your target region.
Region mismatch:
Fix: Update agentcore/aws-targets.json to match your aws configure default region, or run aws configure set region <REGION>.
Memory stuck in CREATING:
This is unusual — normal provisioning takes 2–5 minutes. Check:
If stuck, try removing and re-adding the memory resource.
Service quota exceeded:
Fix: Request a quota increase in the AWS console → Service Quotas → Amazon Bedrock AgentCore.
If the same error recurs, check agentcore status to see the current state of all resources:
Define targets in agentcore/aws-targets.json:
Deploy to a specific target: