- Newest
- Most votes
- Most comments
{ "metrics": [ [ { "expression": "SELECT COUNT(CallCount)\nFROM SCHEMA("AWS/Usage", Class, Resource, Service, Type)\nWHERE Type = 'API'\nGROUP BY Service, Resource\nORDER BY COUNT() DESC\nLIMIT 20", "label": "${LABEL} [avg: ${AVG}]", "id": "q1" } ], [ "AWS/Usage", "CallCount", "Type", "API", "Resource", "GetMetricData", "Service", "CloudWatch", "Class", "None", { "yAxis": "left", "id": "m1" } ] ], "sparkline": true, "region": "eu-west-1", "view": "timeSeries", "stacked": false, "stat": "Sum", "period": 86400, "yAxis": { "left": { "label": "Count", "showUnits": false } }, "title": "Top 20 AWS APIs by the number of calls in your account" }
When we access GetMetricData through AWS console, like using CloudWatch's dashboard to view graphs, it doesn’t charge Anything. AutoScaling service EC2 detailed monitoring also don’t affect GetMetricData API cost.
If an AWS console is calling GetMetricData on the public CloudWatch endpoint then it will trigger charges, but AWS console should not be doing this.
Can you check if there is any external log monitoring tool such as Grafana or any monitoring company(DataDog/New Relic), which might be using GetMetricData API to fetch the logs and this would be external to AWS and would incur charges. Any external company would be accessing this API through IAM role, so CloudTrail would be a good starting point for you to look assumeRole events events.
Hope you find this helpful.
Comment here if you have additional questions, happy to help.
Abhishek
Relevant content
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
Yes, an external monitoring tool is there. But how can this be tracked with in aws portal about the request count to each asset like ec2,rds etc...
I have been in this situation, like I mentioned, you should follow the cloudtrail route and look up for ** assumeRole** event for the user which is being used by external tool. Most of the GetMetricData API calls within AWS won't be charging you, substantial amount of cost would be coming from external calls. So please proceed with the cloudtrail analysis as I mentioned, you'll have the answer most likely.
Comment here if you have additional questions, glad to help.
Actually, i know it is from an external provider but I am trying to figure out the request counts corresponding to each asset (EC2,RDS etc ...).
I will get the total count via,
{ "metrics": [ [ "AWS/Usage", "CallCount", "Type", "API", "Resource", "GetMetricData", "Service", "CloudWatch", "Class", "None", { "yAxis": "left" } ]
}