Skip to main content
Glama

ec2-describe_instances

Retrieve detailed information about AWS EC2 instances for inventory management, monitoring, and troubleshooting with advanced filtering and pagination capabilities.

Instructions

Retrieve detailed information about EC2 instances with advanced filtering and pagination. This tool provides comprehensive instance data including state, type, networking, tags, and configuration. Essential for inventory management, monitoring, and troubleshooting EC2 infrastructure. **Required Parameters:** - profile_name (str): AWS profile name from ~/.aws/credentials - region (str): AWS region (e.g., 'us-east-1', 'eu-west-1') **Optional Parameters:** - instance_ids (List[str]): Specific instance IDs to retrieve Example: ['i-1234567890abcdef0', 'i-0987654321fedcba0'] - filters (Dict[str, Any]): Advanced filtering options **Instance State Filters:** - 'instance-state-name': ['pending', 'running', 'shutting-down', 'terminated', 'stopping', 'stopped'] **Instance Type Filters:** - 'instance-type': ['t2.micro', 't3.small', 'm5.large', 'c5.xlarge'] **Network Filters:** - 'vpc-id': ['vpc-12345678'] - Filter by VPC - 'subnet-id': ['subnet-12345678'] - Filter by subnet - 'private-ip-address': ['10.0.1.100'] - Filter by private IP - 'public-ip-address': ['54.123.45.67'] - Filter by public IP **Tag Filters:** - 'tag:Name': ['web-server', 'database'] - Filter by Name tag - 'tag:Environment': ['production', 'staging'] - Filter by Environment tag - 'tag-key': ['Owner'] - Filter by tag key existence **Security and Compliance:** - 'security-group-id': ['sg-12345678'] - Filter by security group - 'key-name': ['my-key-pair'] - Filter by key pair - 'monitoring-state': ['enabled', 'disabled'] - Filter by detailed monitoring **Architecture Filters:** - 'architecture': ['i386', 'x86_64', 'arm64'] - Filter by architecture - 'root-device-type': ['ebs', 'instance-store'] - Filter by root device type - 'virtualization-type': ['hvm', 'paravirtual'] - Filter by virtualization - max_results (int): Limit results (1-1000). Default: no limit - next_token (str): Pagination token from previous request **Common Use Cases:** 1. List all running instances: filters={'instance-state-name': ['running']} 2. Find instances by tag: filters={'tag:Environment': ['production']} 3. Get instances in specific VPC: filters={'vpc-id': ['vpc-12345678']} 4. Find instances by type: filters={'instance-type': ['t3.micro', 't3.small']} 5. Security audit: filters={'security-group-id': ['sg-12345678']} **Response includes:** Instance ID, state, type, AMI ID, key name, launch time, networking details, security groups, tags, monitoring state, and more. Use pagination with max_results and next_token for large environments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionYes
profile_nameNodefault
instance_idsNo
filtersNo
max_resultsNo
next_tokenNo

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Havoc24k/aws-sa-tools-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server