
Agent Deployment
OfficialFreeStreamline your agent deployment process on AWS.
Free · Opens the source repo
What Agent Deployment does
The Agent Deployment skill is designed to facilitate the deployment of your AgentCore agents to AWS, providing a comprehensive set of tools for both pre-deployment validation and post-deployment diagnostics. This skill is particularly useful for developers and DevOps engineers who need to ensure their configurations are correct before deploying, or who need to troubleshoot issues when a deployment fails. By using this skill, you can validate your configuration files, check IAM permissions, and ensure that your deployment targets are correctly set up.
When preparing to deploy, the skill allows you to run pre-flight checks that verify your configuration files and IAM permissions, helping to catch common errors such as region mismatches or malformed JSON files before they cause deployment failures. It also enables you to preview what resources will be created during the deployment process without actually executing the deployment, which is a crucial step for ensuring that your changes are correct and will not disrupt existing resources.
In the event of a failed deployment, the skill provides diagnostic capabilities to help you identify the root cause of the failure. It can analyze error messages and logs, guiding you through common issues such as IAM permission errors or model access problems. This allows developers to quickly resolve issues and retry their deployments, minimizing downtime and improving productivity.
Overall, this skill is ideal for teams working with AWS who want to streamline their deployment process, ensure compliance with best practices, and reduce the likelihood of errors during deployment. Whether you are deploying to staging or production environments, this skill provides the necessary tools to manage your deployments effectively.
When to use it
Use this skill when you are ready to deploy your agent and want to validate configurations, or when a previous deployment has failed and you need to diagnose the issue.
When not to use it
This skill is not suitable for production hardening or for adding capabilities before deployment. For VPC configuration errors, other tools should be used.
What you can build with it
Pre-flight Validation
Run configuration checks before deploying to ensure everything is set up correctly.
Troubleshooting Deploy Failures
Diagnose and resolve issues when a deployment fails, reducing downtime.
Canary Deployments
Set up canary deployments to test changes in a controlled manner before full rollout.
How to install Agent Deployment
View source1. Install with the skills CLI
npx skills add aws/agent-toolkit-for-aws/agents-deploy --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by awsdeploy
Deploy your AgentCore agent to AWS, or diagnose why a deploy failed.
When to use
- You're ready to deploy and want to validate config first
agentcore deployfailed with an error- You want to preview what deploy will create without actually deploying
- You want to deploy to a specific target (staging, production)
- You need to roll back to a previous version, pin to a specific version, or set up canary deployments
Input
$ARGUMENTS is optional:
/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 version
Process
Step 0: Verify CLI version
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.
Step 1: Determine the situation
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.
Path A: Pre-flight validation
Run these checks before agentcore deploy:
Check 1: Validate config files
Show the developer this command to run:
agentcore validate
This catches malformed agentcore.json before CDK even starts.
Check 2: Verify region alignment
The most common deploy failure is a region mismatch. Show the developer these commands to verify:
# 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-identity
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.
Check 3: Verify Bedrock model access
Show the developer this command to check enabled models in their region:
aws bedrock list-foundation-models --region $(aws configure get region) \
--query 'modelSummaries[?modelLifecycle.status==`ACTIVE`].modelId' \
--output table
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.
Check 4: Preview what will be deployed
agentcore deploy --dry-run
agentcore deploy --diff
--dry-run shows what resources will be created. --diff shows the CDK diff against what's currently deployed.
Check 5: Verify IAM permissions
Show the developer the permissions needed and this verification command:
aws 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*"
Run the deploy
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 target
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:
agentcore status --type memory
Path B: Diagnose a failed deploy
Step B1: Read the error
If the developer pasted an error, diagnose it directly. If not, read the deploy logs:
# View recent deploy logs
ls -lt agentcore/.cli/logs/
cat agentcore/.cli/logs/deploy-*.log 2>/dev/null | tail -100
Step B2: Match to known failure patterns
IAM permission error:
User: arn:aws:iam::123456789012:user/dev is not authorized to perform: iam:CreateRole
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:
This stack uses assets, so the toolkit stack must be deployed to the environment
Fix:
npx cdk bootstrap aws://<YOUR_ACCOUNT_ID>/<REGION>
ECR authorization error:
no basic auth credentials
Error response from daemon: Head "https://<YOUR_ACCOUNT_ID>.dkr.ecr.<REGION>.amazonaws.com/..."
Fix:
aws ecr get-login-password --region <REGION> | \
docker login --username AWS --password-stdin <YOUR_ACCOUNT_ID>.dkr.ecr.<REGION>.amazonaws.com
Model access denied during deploy:
ValidationException: The provided model identifier is invalid
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:
Stack ... is in region us-east-1 but the target is us-west-2
Fix: Update agentcore/aws-targets.json to match your aws configure default region, or run aws configure set region <REGION>.
Memory stuck in CREATING:
Memory resource is in CREATING state after 10 minutes
This is unusual — normal provisioning takes 2–5 minutes. Check:
agentcore status --type memory --json
If stuck, try removing and re-adding the memory resource.
Service quota exceeded:
LimitExceededException: Account limit for AgentCore runtimes exceeded
Fix: Request a quota increase in the AWS console → Service Quotas → Amazon Bedrock AgentCore.
Step B3: After fixing, re-run
agentcore deploy -y
If the same error recurs, check agentcore status to see the current state of all resources:
agentcore status
agentcore status --state pending-removal # resources marked for deletion
Deploying to multiple targets
Define targets in agentcore/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"
}
]
Deploy to a specific target:
agentcore deploy --target staging -y
agentcore deploy --target production -y
Output
- Pre-flight check results with specific fixes for any issues found
- Diagnosis of deploy failure with the specific fix
- Deploy command to run after fixes are applied
Frequently asked questions about Agent Deployment
Similar skills
Turborepo
Optimized build system for JavaScript/TypeScript monorepos.
Azure Pipelines Validation
Streamline your Azure DevOps pipeline changes locally.
Azure Developer CLI
Streamline your Azure project workflows with best practices.
Azure Container Registry CLI
Manage Azure Container Registry resources with ease.
Aspire
Build and orchestrate polyglot distributed applications seamlessly.
Vercel CLI
Manage and deploy Vercel projects from the command line.
