empty get-metric-statistics

0

get-metric-statistics returns no results while cloud watch console shows data. I run

aws cloudwatch get-metric-statistics --namespace "AWS/Usage" --metric-name "ResourceCount" --start-time 2022-02-28T11:30:00Z --end-time 2022-02-28T14:50:00Z --period 60 --statistics Average --dimensions "Name=Type,Value=Resource"

The metric is

{
    "view": "timeSeries",
    "stacked": false,
    "region": "us-west-2",
    "stat": "Average",
    "period": 300,
    "metrics": [
        [ { "expression": "SELECT AVG(ResourceCount) FROM SCHEMA(\"AWS/Usage\") WHERE Type = 'Resource' AND Resource = 'vCPU' AND Service = 'EC2' AND Class = 'Standard/OnDemand'", "label": "", "id": "q1" } ],
        [ "AWS/Usage", "ResourceCount", "Type", "Resource", "Resource", "vCPU", "Service", "EC2", "Class", "Standard/OnDemand", { "id": "m1" } ]
    ]
}
No Answers

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.

Guidelines for Answering Questions