Usage Guide

November 30, 2025 ยท View on GitHub

This guide covers the tools, resources, and prompt templates provided by the AWS MCP Server.

For installation and setup, see the README.

Table of Contents

Core Tools

The server provides two tools that give Claude access to the full AWS CLI.

aws_cli_help

Purpose: Get documentation for any AWS service or command.

Parameters:

  • service (required): AWS service name (e.g., "s3", "ec2", "lambda")
  • command (optional): Specific command within the service (e.g., "ls", "describe-instances")

Examples:

aws_cli_help(service="s3")              # General S3 help
aws_cli_help(service="s3", command="cp") # Help for s3 cp command
aws_cli_help(service="ec2", command="describe-instances")

Use this tool first to learn command syntax before executing.

aws_cli_pipeline

Purpose: Execute AWS CLI commands with optional Unix pipes.

Parameters:

  • command (required): The AWS CLI command (must start with aws)
  • timeout (optional): Command timeout in seconds (default: 300)

Examples:

# Simple command
aws s3 ls

# With output filtering
aws ec2 describe-instances | jq '.Reservations[].Instances[].InstanceId'

# Chain multiple filters
aws logs describe-log-groups | grep "production" | head -10

# Complex queries
aws ec2 describe-instances --query 'Reservations[].Instances[?State.Name==`running`].[InstanceId,Tags[?Key==`Name`].Value]' --output table

Context Resources

Resources provide Claude with read-only access to your AWS configuration and environment.

ResourceURIDescription
Profilesaws://config/profilesAvailable AWS profiles from ~/.aws/config
Regionsaws://config/regionsAll AWS regions with descriptions
Region Detailsaws://config/regions/{region}AZs and services for a specific region
Environmentaws://config/environmentCurrent profile, region, credential status
Accountaws://config/accountAccount ID and alias

Example Usage:

Ask Claude: "Check aws://config/environment to see which region I'm connected to"

Prompt Templates

Pre-defined prompts help generate AWS commands following best practices.

Core Operations

PromptPurposeParameters
create_resourceGenerate creation commands with security best practicesresource_type, resource_name
resource_inventoryList resources with metadataservice, region (default: all)
resource_cleanupFind unused resourcesservice, criteria (default: unused)
troubleshoot_serviceDiagnose resource issuesservice, resource_id

Security & Compliance

PromptPurposeParameters
security_auditAudit service for security risksservice
security_posture_assessmentAccount-wide security checkโ€”
iam_policy_generatorCreate least-privilege policiesservice, actions, resource_pattern
compliance_checkCheck compliance standardscompliance_standard, service

Cost & Performance

PromptPurposeParameters
cost_optimizationFind cost savingsservice
performance_tuningAnalyze and suggest tuningservice, resource_id

Infrastructure

PromptPurposeParameters
serverless_deploymentDeploy Lambda/API Gatewayapplication_name, runtime
container_orchestrationSetup ECS/EKScluster_name, service_type
vpc_network_designDesign secure VPCvpc_name, cidr_block
service_monitoringSetup CloudWatch alarmsservice, metric_type
disaster_recoverySetup backups and DRservice, recovery_point_objective

Best Practices

  1. Check Help First: Ask Claude to use aws_cli_help before running unfamiliar commands
  2. Verify Context: Use aws://config/environment to confirm profile and region
  3. Dry Runs: For destructive operations, ask Claude to use --dry-run when supported
  4. Least Privilege: Ensure your AWS credentials have only necessary permissions
  5. Review Commands: Ask Claude to show the command before executing sensitive operations