CloudWatch Metric Guide

AWS/ApiGateway/LatencyMilliseconds

LatencyAmazon API Gateway CloudWatch metric

Latency measures the total time between when API Gateway receives a request from a client and when it returns a response. This includes the backend integration time (IntegrationLatency) plus API Gateway's own overhead — authorizers, request/response mapping templates, and throttling checks.

What it measures

About Latency

Latency measures the total time between when API Gateway receives a request from a client and when it returns a response. This includes the backend integration time (IntegrationLatency) plus API Gateway's own overhead — authorizers, request/response mapping templates, and throttling checks.

NamespaceAWS/ApiGateway
Metric nameLatency
UnitMilliseconds
AWS docsOfficial Amazon API Gateway metrics reference

Why this metric matters

Latency is the metric your API consumers actually feel — it's the full round trip, not just what happens in your backend. Because it wraps IntegrationLatency plus API Gateway's own processing (custom authorizers, request/response transformations, usage-plan throttling checks), a gap between Latency and IntegrationLatency tells you where time is actually going: if the two track closely, your backend is the bottleneck; if Latency runs noticeably higher than IntegrationLatency, the overhead is in API Gateway's own request pipeline (commonly a slow Lambda authorizer or a heavy VTL mapping template).

Latency distributions on API traffic are almost never symmetric — a small number of slow requests (cold starts, lock contention, GC pauses in the backend) can badly skew an Average-based alarm while leaving the typical request unaffected. Alarming on a percentile statistic (p90 or p99) rather than Average is standard practice for latency-type metrics generally, and CloudWatch supports percentile statistics directly on this metric.

Recommended alarm threshold for Latency

Recommended threshold

p99 Latency > 3,000 ms (3 seconds) for 5 consecutive minutes

AWS does not publish a universal latency threshold for API Gateway — acceptable latency depends entirely on your API's SLA and backend. The 3-second p99 floor (Nuberio recommendation) is a conservative default for general-purpose APIs; tighten it if your API serves interactive/synchronous traffic (e.g., under 1 second) or relax it for batch/async-style endpoints. Use p99 rather than Average so a handful of slow requests aren't averaged away.

Is your Latency alarm already set up correctly?

The free Nuberio Audit scans your CloudWatch setup and flags missing or misconfigured alarms — including Latency — in 5 minutes.

Run a free audit →

Common failures that show up in Latency

When Latency reaches an alarm threshold, these are the most common root causes — in order of how often Nuberio sees them across customer AWS accounts.

  • Backend cold starts — a Lambda integration or newly scaled-out container adds hundreds of milliseconds to IntegrationLatency on the first requests after a scaling event

  • Slow or misconfigured Lambda authorizer — a custom authorizer that calls an external identity provider on every request adds latency to every single call, not just unauthenticated ones

  • Heavy VTL mapping templates — complex request/response transformation logic in Velocity Template Language runs synchronously on API Gateway's own compute, adding overhead independent of the backend

  • Downstream dependency degradation — the backend integration (Lambda, HTTP endpoint, VPC link target) is waiting on a slow database, third-party API, or downstream service

  • Throttling-induced retries — client-side retry logic against a throttled (429) endpoint compounds perceived latency even though each individual request is fast

How the Nuberio Audit checks Latency

The free Audit scans every Amazon API Gateway resource in your account and checks whether a Latency alarm exists, whether its threshold and evaluation period are configured sensibly, and flags it if it's missing entirely. Every finding comes with the exact CLI command to fix it — read-only access, no credit card, results in about 5 minutes.

Nuberio Audit

Scans your CloudWatch setup for missing or misconfigured Latency alarms. Free, 5-minute read-only scan.

Run a free audit →

Related Amazon API Gateway metrics

Latency rarely fails in isolation. These metrics tend to correlate — monitor them together for complete Amazon API Gateway coverage.

FAQ

Frequently asked questions about Latency

Common questions about setting up CloudWatch alarms for Latency in Amazon API Gateway.

What is the recommended CloudWatch alarm threshold for Latency?+

p99 Latency > 3,000 ms (3 seconds) for 5 consecutive minutes. AWS does not publish a universal latency threshold for API Gateway — acceptable latency depends entirely on your API's SLA and backend. The 3-second p99 floor (Nuberio recommendation) is a conservative default for general-purpose APIs; tighten it if your API serves interactive/synchronous traffic (e.g., under 1 second) or relax it for batch/async-style endpoints. Use p99 rather than Average so a handful of slow requests aren't averaged away.

Which CloudWatch namespace does Latency belong to?+

Latency is published in the AWS/ApiGateway namespace with a unit of Milliseconds. You can find it in the CloudWatch console under "Metrics" → "AWS/ApiGateway". See the Amazon API Gateway CloudWatch metrics reference in the AWS documentation.

Does Nuberio automatically create CloudWatch alarms for Latency?+

No — the free Nuberio Audit does not create alarms for you. It scans your CloudWatch setup and tells you which Amazon API Gateway resources are missing a Latency alarm, then gives you the exact CLI command to create it yourself.

Can I use Nuberio without already having a Latency alarm set up?+

Yes. The free Audit works whether or not you have any Latency alarm configured — it reads the resource directly from CloudWatch and tells you which resources need one, plus the copy-paste AWS CLI command to create it.

This page is part of the CloudWatch metric guide — thresholds and debugging guidance for every metric across RDS, Lambda, ECS, ALB, EC2, and DynamoDB. To find which Amazon API Gateway alarms your account is missing — including Latency — run the free CloudWatch alarm audit. The scan takes under 5 minutes and requires no account.