Skip to content

Instantly share code, notes, and snippets.

@9horses
9horses / gist:99d12f402badc1049dcac96b9bc14067
Created October 31, 2022 21:15
aws cli cheatsheet for ec2 management
# disable client side paging
export AWS_PAGER=""
# list EC2 instances in default region
aws ec2 describe-instances --query "Reservations[*].Instances[*].{IP:PublicIpAddress,ID:InstanceId,Type:InstanceType,State:State.Name,Name:Tags[0].Value}" --output=table
# list EC2 instances in a specific region
aws ec2 describe-instances --query "Reservations[*].Instances[*].{IP:PublicIpAddress,ID:InstanceId,Type:InstanceType,State:State.Name,Name:Tags[0].Value}" --output=table --region=us-east-1
# start an EC2 instance

Keybase proof

I hereby claim:

  • I am 9horses on github.
  • I am urano (https://keybase.io/urano) on keybase.
  • I have a public key ASBkMn8NTr2H80g4Ik64U11nHCLoNEk88Uut6AiQObiV1Qo

To claim this, I am signing this object: