Skip to content

Can I check Trusted Advisor cost optimization recommendations using API?

0

Hi all

I want to check 28 Trusted Advisor cost optimization recommendations listed in https://docs.aws.amazon.com/awssupport/latest/user/cost-optimization-checks.html using API. Looking at the Trusted Advisor actions - https://docs.aws.amazon.com/service-authorization/latest/reference/list_awstrustedadvisor.html, seems like DescribeChecks or DescribeCheckItems may give those results, but I'm not sure.

Can I check Trusted Advisor cost optimization recommendations using API?

Thanks.

asked 7 months ago112 views

1 Answer
0

Yes, you can check Trusted Advisor cost optimization recommendations using the API. The AWS Trusted Advisor API provides programmatic access to recommendations for your account or all accounts within your AWS Organization.

To view cost optimization recommendations, you can use the following API operations:

  • ListChecks: This operation allows you to get a list of checks and their descriptions. You can filter checks by pillar, including "cost_optimizing" to specifically retrieve cost optimization checks.

  • ListRecommendations: This operation lists recommendations and allows you to filter by AWS service. You can use parameters like max-items to control the number of results returned.

  • GetRecommendation: This operation retrieves details about a specific recommendation by its identifier.

  • ListRecommendationResources: This operation lists all resources associated with a particular recommendation.

The API uses HTTP methods and returns results in JSON format. To use the Trusted Advisor API, you need an AWS Business Support+, Enterprise Support, or Unified Operations plan.

For cost optimization checks specifically, the recommendations will include details such as estimated monthly savings and the status of flagged resources. The API response includes information about the check ID, timestamp, status, resources summary, and category-specific summaries including cost optimization metrics.

You can authenticate your requests using the Signature Version 4 Signing Process and access the API through AWS CLI, SDKs, or direct HTTP calls.
Sources
Cost optimization - AWS Support
Trusted Advisor examples using AWS CLI - AWS SDK Code Examples
Get started with the Trusted Advisor API - AWS Support
ListChecks - AWS Trusted Advisor

answered 7 months ago

AWS
EXPERT

reviewed 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.