Created
March 20, 2015 07:53
-
-
Save sebsto/468670c7c0d5feeade69 to your computer and use it in GitHub Desktop.
AWS CLI : discover your service limits from the command line
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 support describe-trusted-advisor-check-result --check-id eW7HH0l7J9 --query 'result.sort_by(flaggedResources[?status!="ok"],&metadata[2])[].metadata' --output table --region us-east-1 |
Just in case AWS change check ids , here is command to get id.
# region must be us-east-1 as it only when support command works
CHECK_ID=$(aws --region us-east-1 support describe-trusted-advisor-checks --language en --query 'checks[?name==`Service Limits`].{id:id}[0].id' --output text)
echo $CHECK_ID
eW7HH0l7J9
For everybody that's still looking for this information, AWS makes you pay for premium support to get valid/useful output. Boo 👎.
An error occurred (SubscriptionRequiredException) when calling the DescribeTrustedAdvisorCheckResult operation: AWS Premium Support Subscription is required to use this service.```
what is the string to use for all resources instead of flagged resources?
Trusted Advisor requires a subscription to Support Contract, as explained here https://aws.amazon.com/premiumsupport/technology/trusted-advisor/
2021 UPDATE
To find check ID :
aws --region us-east-1 support describe-trusted-advisor-checks --language en --query 'checks[?category==`service_limits`]'
Once you found the checkID (in the below example, I am using "EC2 On-Demand instances - Standard") :
aws support describe-trusted-advisor-check-result --region us-east-1 --check-id 0Xc6LMYG8P --output table --query 'result.sort_by(flaggedResources[?status!="ok"],&metadata[2])[].metadata'
@sebsto
Thanks a lot for update!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works great! thanks for sharing...