Last active
March 18, 2022 16:56
-
-
Save thedoc31/2905ae3f1e9a9e73b1ad97f349a87a64 to your computer and use it in GitHub Desktop.
Return count of instance types in use in current AWS region
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
aws ec2 describe-instances --filters Name=tag-key,Values=Name --query 'Reservations[*].Instances[*].{Instance:InstanceId,Instance:InstanceType}' --output text | sort | uniq -c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To calculate a different region add "--region " after the "aws" command.