CloudWatch Metrics - Max time window exceeded for SQL query

0

Hi, I created a graph on CloudWatch using a query. If the graph is set to 3h or less, it's displaying. But when it's set to anything greater than 3h, its displaying a Max time window exceeded for SQL query error. Is there any limit I should adjust to make my query work?

This is the query I'm using

SELECT AVG("4XXError") FROM SCHEMA("AWS/ApiGateway") WHERE ApiName = 'apiname' AND Stage = 'stage'

TIA

asked 2 years ago5489 views
2 Answers
2
Accepted Answer

See GetMetricData documentation:

Metrics Insights queries can query only the most recent three hours of metric data.

That is currently a hard limit and there is nothing you can do to extend.

AWS
answered 2 years ago
  • That makes sense, thanks!

  • Could someone please share the work around for this? Is manual metrics query for every instance the only way?

0

"fixed" it for our use case (displaying uptimes of ecs tasks) for now by setting the intervals here: Enter image description here

Eric
answered 2 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.

Guidelines for Answering Questions