To monitor an AWS API, measure the HTTP response received by the client, Lambda execution failures and capacity limits separately. I propose starting incident diagnosis with the HTTP signal, then using Lambda signals to explain the cause. A function error alarm alone leaves gaps.
This architecture decision covers an API Gateway REST API with a Lambda proxy integration. It is a design proposal, not a client outcome. This evergreen guide was reviewed on December 4, 2026; the event date records that editorial review.
Three questions before creating alarms
Does the consumer receive a valid response? Does the code finish successfully? Is there capacity to accept new invocations? Answer all three before deciding who should be notified. A handler that catches a failure and returns HTTP 503 can finish normally from Lambda's perspective. HTTP status and execution outcome therefore carry different meanings.
AWS documents the proxy response with statusCode. This Node.js fragment illustrates an unavailable dependency; it does not implement a complete API:
export const handler = async () => ({
statusCode: 503,
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ message: 'Temporarily unavailable' })
});
The operational inference is that exceptions alone cannot describe HTTP availability. Confirm this behavior with your integration in a test environment.
Choose signals to answer specific questions
For REST APIs, AWS distinguishes 5XXError, Latency and IntegrationLatency. Latency includes integration time and other API Gateway overhead. I propose comparing both latency signals during an incident, without treating their difference as an exact network measurement. These names apply to REST APIs: check the appropriate metrics before transferring the design to HTTP APIs.
In Lambda, Errors measures execution failures and Throttles counts throttled requests. Throttled requests are excluded from Invocations and Errors. I propose keeping a separate capacity signal so an invocation denominator does not hide rejections that happen before execution.
A proposed starting policy
Define the service, environment and stage before aggregating data. For an initial design review, I would treat the following rules as hypotheses for the team to calibrate:
- Impact notification: sustained HTTP 5xx rate with enough traffic to interpret the percentage.
- Execution diagnosis: Lambda errors in the same window, with access to service logs.
- Capacity diagnosis: throttling even when successful execution counts appear stable.
- Degradation: high latency relative to the agreed objective for that operation.
In an invented example, 2 failures out of 10 requests equal 20%, while 2 out of 10,000 equal 0.02%. The percentage compares relative impact; the count and the importance of the workflow inform urgency. These are not recommended thresholds. For a low traffic API, add a controlled check of a critical operation to distinguish inactivity from unavailability.
What every alarm needs
I propose documenting an owner, evaluation window, statistic, dimensions, missing data policy and first response. Avoid automatically interpreting absent traffic as a healthy service. Agree how that state should be represented before enabling notifications.
CloudWatch supports alarms on metrics and expressions, as well as composite alarms. My recommendation is to begin with explainable signals and group notifications after understanding which incident each signal covers. Review costs before enabling detailed metrics by method and resource: API Gateway documentation identifies additional charges.
Verification before accepting the design
In a test environment, exercise a controlled 503 response, an exception and a capacity rejection within safe limits. Record the HTTP status, observed metrics, alarm transition and delivered notification for each scenario. These proposed checks were not executed for this article. Production saturation tests do not belong in an editorial review.
I would accept the design once each scenario has evidence, an accountable owner and a recovery procedure. Keep correlation identifiers without tokens or sensitive request bodies; notifications should lead to diagnosis without copying private information.
Is zero Lambda errors enough?
No. That signal describes one part of the system. Compare it with HTTP responses, rejected requests and a critical workflow check. The final choice depends on the team's definition of a successful operation.
Related engineering work
Explore the portfolio AWS cases and the CV and contact options to assess the professional profile. The guide to error contracts between Angular and Node.js complements this decision from the interface perspective. These links provide context; they do not claim that this alarm policy is already deployed.