Created
January 29, 2019 20:10
-
-
Save atucom/ff6cecf38ac999c9223187a7cae55c41 to your computer and use it in GitHub Desktop.
List EC2 and Lightsail boxes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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