Skip to content

Latest commit

 

History

History
27 lines (15 loc) · 650 Bytes

File metadata and controls

27 lines (15 loc) · 650 Bytes

Ec2 Describe Instances

A read-only script that queries Ec2 resources and displays information.

Running

bash ec2-describe-instances.sh

What it does

  1. Listing all instances"; aws ec2 describe-instances --query 'Reservations[].Instances[].{Id:InstanceId,Type:InstanceType,State:State.Name,Name:Tags[?Key==Name].Value|[0]}' --output table 2>/dev/null || echo " No instances
  2. Counting by state

Resources created

None — this script is read-only.

Cost

No cost. This script only reads existing resources.

Related docs