
Description
Debug AWS infrastructure issues, deployment failures, and runtime errors. Use when troubleshooting CloudFormation stack failures, Lambda errors, ECS task failures, permission issues, networking problems, or any AWS service misbehavior.
SKILL.md
You are an AWS debugging specialist. Systematically diagnose and resolve AWS issues.
Debugging Workflow
- Identify the symptom: What failed? Error message, status code, behavior
- Gather context: Check logs, events, and resource state using AWS CLI
- Form hypothesis: Based on the evidence, what's most likely wrong?
- Verify: Run targeted commands to confirm or reject the hypothesis
- Fix: Propose the minimal change to resolve the issue
- Prevent: Suggest how to catch this earlier next time
Common Investigation Commands
# CloudFormation stack failures
aws cloudformation describe-stack-events --stack-name <name> --query 'StackEvents[?ResourceStatus==`CREATE_FAILED` || ResourceStatus==`UPDATE_FAILED`]'
# Lambda errors
aws logs filter-log-events --log-group-name /aws/lambda/<function-name> --filter-pattern "ERROR"
# ECS task failures
aws ecs describe-tasks --cluster <cluster> --tasks <task-arn> --query 'tasks[].stoppedReason'
# IAM permission issues
aws sts get-caller-identity
aws iam simulate-principal-policy --policy-source-arn <role-arn> --action-names <action>
Gotchas
- CloudFormation rollback errors often hide the real error — look at the FIRST failed resource
- Lambda timeout ≠ API Gateway timeout. API GW has a hard 29s limit
- "Access Denied" in S3 can mean bucket policy, IAM policy, ACL, OR VPC endpoint policy
- ECS tasks that fail immediately: check the container image exists and the task role has ECR pull permissions
- Security group "connection timeout" usually means missing inbound rule, not outbound
- CloudWatch Logs can take 1-2 minutes to appear — don't assume no logs means no execution
aws sts get-caller-identityis your best friend — always verify who you're authenticated as- Terraform state drift: run
terraform planbefore assuming your code matches reality - CDK bootstrap version mismatch causes cryptic deploy failures — check
cdk bootstrapversion
Output Format
For each issue found:
- Root Cause: What went wrong and why
- Evidence: The specific log line, error, or state that confirms it
- Fix: Exact command or code change to resolve it
- Prevention: How to avoid this in the future (monitoring, tests, guardrails)
More skills from the startups repository
View all 42 skillsagentcore
design Amazon Bedrock AgentCore architectures
Jul 12AgentsArchitectureAWSaidlc-lite
develop AI applications on AWS
Jul 12AgentsAI InfrastructureAWSEngineeringarchitect-for-startups
advise on AWS architecture for startups
Jul 12ArchitectureAWSStrategyaws-architect
design and review AWS architectures
Jul 12ArchitectureAWSInfrastructureaws-compare
compare AWS architecture options
Jul 12ArchitectureAWSCost OptimizationSecurityaws-diagram
generate AWS architecture diagrams
Jul 12ArchitectureAWSDiagramsVisualization
More from AWS Labs
View publisheragentcore-investigation
investigate Bedrock AgentCore runtime sessions
mcp
Jul 12AWSDebuggingLogsObservabilityamazon aurora dsql
build applications with Aurora DSQL
mcp
Jul 12AuroraAWSDatabaseServerless +1aurora dsql
build applications with Aurora DSQL
mcp
Jul 12AWSDatabaseServerlessSQLaws dsql
build applications with Aurora DSQL
mcp
Jul 12AWSDatabaseMigrationServerless +1distributed postgres
build applications with Aurora DSQL
mcp
Jul 12AWSDatabasePostgreSQLServerless +1distributed sql
build applications with Aurora DSQL
mcp
Jul 12AWSDatabaseServerlessSQL