Last active
June 13, 2017 09:51
-
-
Save blackpioter/990ac56fe27092b05f2467cff9481d70 to your computer and use it in GitHub Desktop.
AWS CS
This file contains 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
## AWS show instance count by type | |
aws ec2 describe-instances --filters Name=instance-state-name,Values=running --output json | jq ".Reservations[].Instances[].InstanceType" | sort | uniq -c | sort -n | |
## AWS List instances in table | |
aws ec2 describe-instances --output table --query 'Reservations[].Instances[].[Tags[?Key==`Name`] | [0].Value, State.Name]' | |
## AWS List running instances in table | |
aws ec2 describe-instances --output table --query 'Reservations[].Instances[].[Tags[?Key==`Name`] | [0].Value, PublicIpAddress, PrivateIpAddress , InstanceType, SubnetId ]' --filters Name=instance-state-name,Values=running | |
## AWS EC2 limits for account / region | |
https://eu-west-1.console.aws.amazon.com/ec2/v2/home?region=eu-west-1#Limits: | |
## AWS remove bucket and its content (doesn't work on versioned bucket) | |
aws s3 rb s3://bucket_name --force --profile profile_name | |
## AWS show ELB private IPs | |
aws ec2 describe-network-interfaces --filters "Name=description,Values=ELB your-elb-name" | jq ".NetworkInterfaces[].PrivateIpAddresses[].PrivateIpAddress" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how to get to know EC2 limits Through Command line for each and every region