aws/ec2-describe

Describe EC2 Instances

List details about EC2 instances.

aws
ec2
list
instances

Command

aws ec2 describe-instances

Explanation

Retrieves information about running, stopped, or terminated EC2 instances.

Common Use Cases

  • Listing all running instances
  • Retrieving instance state, IP, and tags

Best Practices

  • Use filters (`--filters`) for faster, targeted results
  • Format results with `--query` and `--output` for clarity

Common Mistakes to Avoid

  • Omitting region and getting empty response
  • Expecting default output to be human-readable (use `--output table`)

Troubleshooting

Problem: Empty results

Solution: Verify the correct region and permissions.

Examples

List all EC2 instances

aws ec2 describe-instances

Describe a specific instance

aws ec2 describe-instances --instance-ids i-1234567890abcdef0