/aws-devops-agent:setupfrom aws-devops-agent
Walks through installing the AWS MCP Server binary, configuring AWS profiles per AgentSpace, discovering space IDs, and verifying setup for the AWS DevOps Agent.
Ships in aws-devops-agent. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run this skill when:
ExpiredTokenException, AccessDeniedException, or "no AgentSpace found"The plugin uses the AWS MCP Server (uvx mcp-proxy-for-aws) which is fetched automatically via uvx. Verify uv is installed:
uv --version # should print 0.4.0+
uvx mcp-proxy-for-aws@latest --help # fetches and runs — no pip install needed
If uv is missing, install it: curl -LsSf https://astral.sh/uv/install.sh | sh
Verify AWS credentials are configured:
aws sts get-caller-identity # should return your account/user info
If credentials are missing or expired: aws sso login (SSO) or aws configure (access keys).
Ask the user once, listing what's needed:
What AWS accounts hold your AgentSpaces? For each, tell me:
- AWS account ID
- Region (default
us-east-1)- Purpose (e.g. "production", "staging", "shared knowledge")
Use named profiles in ~/.aws/config. The naming convention is the purpose — not the account ID — so future references stay readable.
# ~/.aws/config
[profile devops-prod]
region = us-east-1
[profile devops-stage]
region = us-east-1
[profile devops-kb]
region = us-east-1
Then attach credentials:
aws configure sso --profile devops-prodaws configure --profile devops-prod~/.aws/config to add sso_session, sso_account_id, sso_role_nameVerify each profile:
AWS_PROFILE=devops-prod aws sts get-caller-identity
For each profile, list spaces using the AWS CLI:
AWS_PROFILE=devops-prod aws devops-agent list-agent-spaces --region us-east-1
Record the space name and ID for each. If a profile has no space:
AWS_PROFILE=devops-prod aws devops-agent create-agent-space --name 'my-prod-space' --region us-east-1 to create one, orIf you installed via /plugin install aws-devops-agent@aws-devops-tools, the AWS MCP Server is configured automatically — the plugin ships its own .mcp.json. Skip to Step 6.
Configure manually only if you are NOT using the plugin (e.g. consuming the AWS MCP Server directly):
{
"mcpServers": {
"aws-mcp": {
"command": "uvx",
"timeout": 100000,
"transport": "stdio",
"args": [
"mcp-proxy-for-aws@latest",
"https://aws-mcp.us-east-1.api.aws/mcp",
"--metadata", "AWS_REGION=us-east-1"
]
}
}
}
Change AWS_REGION=us-east-1 in --metadata if your AgentSpaces are in a different region.
The AWS MCP Server reads credentials from the standard AWS credential chain. Set the primary profile in your shell rc file:
# ~/.zshrc or ~/.bashrc
export AWS_PROFILE=devops-prod # the primary space's profile
Or set it project-scoped for a Claude Code project that should always target a specific space.
After installing the plugin (/plugin install aws-devops-agent@aws-devops-tools), reload: /reload-plugins. Verify the tools are available — you should see aws___call_aws and aws___run_script in /tools.
For each space that is NOT the MCP primary, generate a wrapper script so the user can query it from the terminal:
#!/usr/bin/env bash
# Query the staging AgentSpace
set -euo pipefail
SPACE_ID="as-def456" # staging agent space ID
REGION="us-east-1"
USER_ID="${USER_ID:-${USER:-claude}}"
[ $# -eq 0 ] && { echo "Usage: $(basename "$0") \"your question\""; exit 1; }
# Create a chat session and send the message
EXEC_ID=$(AWS_PROFILE=devops-stage aws devops-agent create-chat --user-id "$USER_ID" --user-type IAM \
--agent-space-id "$SPACE_ID" --region "$REGION" \
--query 'executionId' --output text)
AWS_PROFILE=devops-stage USER_ID="$USER_ID" python3 - "$EXEC_ID" "$SPACE_ID" "$REGION" "$*" <<'EOF'
import os, sys, boto3
exec_id, space_id, region, content = sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4]
user_id = os.environ.get('USER_ID', 'claude')
client = boto3.client('devops-agent', region_name=region)
response = client.send_message(agentSpaceId=space_id, executionId=exec_id, userId=user_id, content=content)
full = []
current = None
for event in response['events']:
if 'contentBlockStart' in event:
current = event['contentBlockStart'].get('type')
elif 'contentBlockDelta' in event and current in (None, 'text'):
delta = event['contentBlockDelta'].get('delta', {})
if 'textDelta' in delta:
full.append(delta['textDelta']['text'])
elif 'contentBlockStop' in event:
current = None
print(''.join(full))
EOF
Install at ~/.local/bin/devops-stage (and chmod +x). Repeat per non-primary space.
This is the file the multi-space skill reads at the start of every future session. Default location: .claude/aws-devops-agent.md (project-scoped) or ~/.claude/AGENTS.md (user-scoped).
# AWS DevOps Agent — local setup
## AgentSpaces
| Space | Account | AWS Profile | Agent Space ID | Region | Purpose |
|-------|---------|-------------|----------------|--------|---------|
| **prod** | 111111111111 | `devops-prod` | `as-abc123` | us-east-1 | Production incidents, customer-facing services |
| **stage** | 222222222222 | `devops-stage` | `as-def456` | us-east-1 | Pre-prod validation, integration testing |
| **kb** | 333333333333 | `devops-kb` | `as-ghi789` | us-east-1 | Shared runbooks, cross-account knowledge |
## MCP primary
Plugin MCP server targets **prod** (`AWS_PROFILE=devops-prod`).
## Reaching other spaces
- `devops-stage "your question"` (shell wrapper)
- `devops-kb "your question"` (shell wrapper)
- Or restart Claude Code with `AWS_PROFILE=<other>` exported.
## Credential refresh
When you see `ExpiredTokenException`:
- SSO: `aws sso login --profile <profile>`
- Access keys: `aws configure --profile <profile>`
Create .claude/settings.json in the project root to auto-approve DevOps Agent tool calls:
{
"permissions": {
"allow": [
"mcp__aws-mcp__aws___call_aws(cli_command=\"aws devops-agent *\")",
"mcp__aws-mcp__aws___run_script",
"mcp__aws-mcp__aws___search_documentation",
"mcp__aws-mcp__aws___read_documentation",
"mcp__aws-mcp__aws___suggest_aws_commands",
"mcp__aws-mcp__aws___list_regions",
"mcp__aws-mcp__aws___get_regional_availability",
"mcp__aws-mcp__aws___recommend",
"mcp__aws-mcp__aws___get_presigned_url",
"mcp__devops-agent-chat__send_message"
]
}
}
This eliminates repeated permission prompts during normal DevOps Agent workflows. Without it, a simple 2-space query requires 5+ manual approvals.
If the file already exists, merge the allow entries rather than overwriting.
Claude Code requires MCP servers from plugins to be explicitly enabled. Add "devops-agent-chat" to your project's .claude/settings.local.json:
{
"enabledMcpjsonServers": ["devops-agent-chat"]
}
If the file already exists, append to the existing array. Without this entry, the local chat tool won't appear in your available tools — forcing the slower aws___run_script fallback.
After editing, run /reload-plugins for the change to take effect.
In Claude Code:
/tools should list aws___call_aws, aws___run_script, AND devops_agent_chat__send_message.
devops_agent_chat__send_message is missing: verify uv is in PATH, then test manually:
cd <plugin-dir> && uv run --with "mcp[cli]" --with boto3 mcp run tools/chat_server.py
Common issues: missing uv, boto3 import error, or Python < 3.10.aws___call_aws(cli_command="aws devops-agent list-agent-spaces --region us-east-1") returns your spaces.devops_agent_chat__send_message(agent_space_id="SPACE_ID", content="Hello, what can you help with?") returns a response within ~10s.devops-stage "list runbooks") prints results.ExpiredTokenException at startup → user needs aws sso login --profile <name>.uvx not found or not in PATH; install uv first. Or check aws sts get-caller-identity to confirm credentials are valid.MCP error -32000: Connection closed → Most commonly missing/expired AWS credentials. Run aws sts get-caller-identity to verify, then aws sso login to refresh. Also check that uvx is in your PATH./reload-plugins, then /tools to confirm aws___call_aws appears.User identity could not be resolved / Missing required parameter: userId on create-chat or send_message → both APIs require explicit identity arguments:
create-chat requires --user-id <name> --user-type IAM|IDC|IDPsend_message requires userId=<name>
For Isengard or direct IAM credentials use --user-type IAM and pass any string matching [a-zA-Z0-9_.-]+ as --user-id (e.g. your Unix username). For SSO/Identity Center use --user-type IDC after aws sso login. Alternatively, use SendMessage on investigation executionIds from create-backlog-task which works with any credential type.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/chatChat with the AWS DevOps AgentHave a fast, conversational analysis with the AWS DevOps Agent. Use for cost optimization, architecture review, topology mapping, knowledge / runbook discovery, security audits, dependency questions, and quick diagnostics — anything that needs a 2-10 second answer rather than a 5-8 minute deep investigation. Trigger words include cost, optimize, review, architecture, topology, what runbooks, show me, compare, audit, what if./investigateInvestigate an AWS incidentRun a deep root-cause investigation on the AWS DevOps Agent. Use when the user describes an incident, alarm, outage, or unexplained behavior — keywords like "5xx", "503", "OOM", "latency spike", "deployment failure", "rollback", "sev1", "investigate", "root cause", "debug", "alarm fired", "service down". Polls and streams progress, then surfaces recommendations./multi-spaceQuerying multiple AgentSpacesCoordinate the AWS DevOps Agent across multiple AgentSpaces from one Claude Code session — route questions to the right space (prod vs staging vs knowledge), query several spaces in parallel and synthesize, or compare findings across accounts. Use whenever the user has more than one AgentSpace configured, mentions multiple AWS accounts, or asks something like "check both prod and staging", "compare across accounts", or "ask the knowledge space".npx claudepluginhub aws-samples/sample-aws-devops-agent-claude-plugin --plugin aws-devops-agentOther plugins' skills for the same job