Skip to content

Instantly share code, notes, and snippets.

@atucom
Created January 29, 2019 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atucom/ff6cecf38ac999c9223187a7cae55c41 to your computer and use it in GitHub Desktop.
Save atucom/ff6cecf38ac999c9223187a7cae55c41 to your computer and use it in GitHub Desktop.
List EC2 and Lightsail boxes
List lightsail boxes:
alias aws_lightsail_list='aws lightsail get-instances --query="instances[*].{Name:name, IP:publicIpAddress, Username:username, State:state.name, key:sshKeyName}" --output=table'
List ec2 boxes:
alias aws_ec2_list='aws ec2 describe-instances --query="Reservations[*].Instances[*].{Launched:LaunchTime, State:State.Name, Key:KeyName, IP:PublicIpAddress, Tags:Tags[0].Value, Region:Placement.AvailabilityZone}" --output=table'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment