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.
What this skill does
# deploy
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 deploy` failed 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:
>
> 1. About to deploy and want to check everything first
> 2. Dealing with a failed deploy — what error did you see?
> 3. Needing to roll back or pin a specific version?"
If the developer needs versioning, rollback, or canary deployment, load [`references/versioning.md`](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:
```bash
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:
```bash
# 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:
```bash
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
```bash
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:
```bash
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
```bash
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:
```bash
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:
```bash
# 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:
```bash
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:
```bash
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:
```bash
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
```bash
agentcore deploy -y
```
If the same error recurs, check `agentcore status` to see the current state of all resources:
```bash
agentcore status
agentcore status --state pending-removal # resources marked for deletion
```
---
## Deploying to multiple targets
Define targets in `agentcore/aws-targets.json`:
```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:
```bash
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
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.