aws-infrastructure

Inspect EC2, ECS, Lambda, and CloudWatch resources to diagnose AWS infrastructure issues.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/erwinv2k-TKG/AgentesVSC --skill aws-infrastructure-erwinv2k-tkg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aws-infrastructure
Source: https://github.com/erwinv2k-TKG/AgentesVSC/tree/main/packs/incidentfox/sre-agent/.claude/skills/infrastructure-aws
Command: npx skills add https://github.com/erwinv2k-TKG/AgentesVSC --skill aws-infrastructure-erwinv2k-tkg

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires boto3, requests, and includes scripts (resource) components.

What problem does it solve? Investigating AWS incidents requires jumping between consoles and CLI commands for EC2, ECS, Lambda, and CloudWatch. This Skill centralizes that workflow into scripted queries so an agent can pull logs, metrics, alarms, and resource details in a consistent, repeatable way. ## Core Features & Use Cases - CloudWatch Logs and Metrics First: Query log groups with filter patterns and retrieve metric datapoints for any namespace, dimension, and statistic. - Resource Inspection: List and describe EC2 instances, ECS services (with deployments and events), and Lambda functions, plus list CloudWatch alarms by state. - Guided Investigation Workflows: Built-in step-by-step flows for EC2 issues, ECS task failures, Lambda errors, and cost/resource audits, with a standardized findings report format. - Use Case: A Lambda function starts throwing errors in production. Run get_lambda_logs.py with an ERROR filter, check the Errors and Duration metrics, and produce a root-cause hypothesis with recommended remediation. ## Quick Start Ask the agent to investigate why the Lambda function api-handler is failing by checking its logs and CloudWatch metrics from the last hour.

Frequently Asked Questions about aws-infrastructure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query CloudWatch logs with a filter pattern?

Run get_cloudwatch_logs.py with --log-group, --filter, and --hours arguments to search log events. It uses the CloudWatch filter_log_events API with pagination and returns timestamped messages in text or JSON format.

How do I investigate a failing ECS service?

List services with list_ecs_services.py, then describe the service to see deployments, events, and task definition details. Follow up with CloudWatch logs filtered for ERROR and CPU metrics for the cluster and service.

Do I need AWS access keys in environment variables?

No. Credentials are fetched automatically from a credential resolver using CREDENTIAL_RESOLVER_URL and SANDBOX_JWT, falling back to the default boto3 chain such as environment variables, profiles, or IRSA for local development.

Can I filter EC2 instances by tags or state?

Yes. list_ec2_instances.py accepts a --filters argument in AWS syntax, such as Name=tag:env,Values=production or Name=instance-state-name,Values=running, and outputs a table or JSON of matching instances.

Why does get_lambda_logs.py report the log group not found?

The script derives the log group as /aws/lambda/<function-name>, which only exists after the function has been invoked at least once. If it is missing, the function likely has not run yet or the name is incorrect.