AwsCLI icon
If icon
SlackIncomingWebhook icon
Schedule icon

AWS API Gateway 5XX Error Rate and Latency Degradation Sentinel

Audits Amazon API Gateway CloudWatch metrics to detect 5XX server errors and integration latency spikes impacting REST/HTTP APIs.

Categories
CloudInfrastructure

How it works

This workflow connects to Amazon CloudWatch via the AWS CLI plugin to sample 5XXError and Latency metrics for designated API Gateway instances. When backend Lambda functions crash, HTTP integration endpoints time out, or authorization microservices fail, API Gateway returns HTTP 500/502/504 status codes. When 5XX error counts breach the configured threshold, an automated Slack incident alert is immediately dispatched.

What you get

  • Real-time detection of backend integration failures and gateway crashes.
  • Correlated latency telemetry to diagnose downstream database and service degradation.
  • Automated incident notification for mobile and web API platform teams.

Who it's for

  • API Platform Engineers and Backend Developers managing public REST and HTTP APIs.
  • SREs maintaining production serverless applications on AWS.

Why orchestrate this with Kestra

  • Unified Telemetry Polling: Automate CloudWatch sampling across multiple APIs without third-party monitoring costs.
  • Flexible Thresholds: Configure custom error thresholds per API tier (e.g. payment APIs vs telemetry ingestion).
  • Incident Escalation: Seamlessly connect to Slack, PagerDuty, or automated rollback flows.

Prerequisites

  • AWS IAM credentials with cloudwatch:GetMetricData permissions.
  • Secrets AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and SLACK_WEBHOOK configured in Kestra.

Quick start

  1. Import this blueprint into Kestra.
  2. Enter your API Gateway name and set credentials.
  3. Trigger the workflow to check API Gateway health.

How to extend

  • Query integration-specific error metrics (e.g., IntegrationLatency).
  • Dispatch PagerDuty incidents for critical public APIs.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.