awslabs-aws-api-mcp-server-call-aws

X-School-Academy's avatarfrom X-School-Academy

To run an exact AWS CLI command, execute a validated `aws ...` command for direct AWS operations when you already know the precise service and parameters; use instead of suggesting commands.

⭐6stars🔀3forks📁View on GitHub🕐Updated Jan 7, 2026

When & Why to Use This Skill

This Claude skill enables the direct execution of validated AWS CLI commands, allowing for seamless cloud infrastructure management and automation. It bridges the gap between AI-driven suggestions and real-world execution by providing a secure, validated environment to perform precise AWS operations across various services. By supporting pagination, error handling, and cross-region parameters, it empowers developers and DevOps engineers to manage S3, EC2, Lambda, and other AWS resources efficiently within their agentic workflows.

Use Cases

  • Resource Provisioning and Management: Quickly create, update, or delete AWS resources like S3 buckets, EC2 instances, or IAM roles using standard AWS CLI syntax.
  • Infrastructure Auditing: Execute complex queries with filters and JMESPath to retrieve real-time status and configuration details of cloud assets for compliance or troubleshooting.
  • Automated DevOps Tasks: Streamline repetitive operations such as rotating access keys, updating Lambda function code, or managing ECS service scaling directly through the agent.
  • Cross-Region Operations: Perform administrative tasks across multiple AWS regions by specifying the --region parameter in validated commands to maintain global infrastructure.
  • Data Management: Handle file uploads, downloads, and synchronization between local working directories and S3 buckets using native AWS CLI commands.
nameawslabs-aws-api-mcp-server-call-aws
description"To run an exact AWS CLI command, execute a validated `aws ...` command for direct AWS operations when you already know the precise service and parameters; use instead of suggesting commands."

Usage

Use the MCP tool dev-swarm.request to send the payload as a JSON string:

{"server_id":"awslabs.aws-api-mcp-server","tool_name":"call_aws","arguments":{}}

Tool Description

Execute AWS CLI commands with validation and proper error handling. This is the PRIMARY tool to use when you are confident about the exact AWS CLI command needed to fulfill a user's request. Always prefer this tool over 'suggest_aws_commands' when you have a specific command in mind. Key points: - The command MUST start with "aws" and follow AWS CLI syntax - Commands are executed in us-west-2 region by default - For cross-region or account-wide operations, explicitly include --region parameter - All commands are validated before execution to prevent errors - Supports pagination control via max_results parameter - Commands can only reference files within the working directory (/var/folders/_0/ff3ds_c93pv14wnhx96y00400000gn/T/aws-api-mcp/workdir); use forward slashes (/) regardless of the system (e.g. if working directory is 'c:/tmp/workdir', use 'c:/tmp/workdir/subdir/file.txt' or 'subdir/file.txt'); relative paths resolve from the working directory. Best practices for command generation: - Always use the most specific service and operation names - Always use the working directory when writing files, unless user explicitly mentioned another directory - Include --region when operating across regions - Only use filters (--filters, --query, --prefix, --pattern, etc) when necessary or user explicitly asked for it Command restrictions: - DO NOT use bash/zsh pipes (|) or any shell operators - DO NOT use bash/zsh tools like grep, awk, sed, etc. - DO NOT use shell redirection operators (>, >>, <) - DO NOT use command substitution ($()) - DO NOT use shell variables or environment variables Common pitfalls to avoid: 1. Missing required parameters - always include all required parameters 2. Incorrect parameter values - ensure values match expected format 3. Missing --region when operating across regions Returns: CLI execution results with API response data or error message

Arguments Schema

The schema below describes the arguments object in the request payload.

{
  "properties": {
    "cli_command": {
      "description": "The complete AWS CLI command to execute. MUST start with \"aws\"",
      "type": "string"
    },
    "max_results": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional limit for number of results (useful for pagination)"
    }
  },
  "required": [
    "cli_command"
  ],
  "type": "object"
}

Background Tasks

If the tool returns a task id, poll the task status via the MCP request tool:

{"server_id":"awslabs.aws-api-mcp-server","method":"tasks/status","params":{"task_id":"<task_id>"}}