AwsCLI icon
If icon
SlackIncomingWebhook icon
Schedule icon

AWS CloudFront Edge 5XX Error Rate and Origin Availability Sentinel

Audits Amazon CloudFront global metrics to detect edge 5XX error rate spikes and origin server reachability failures.

Categories
CloudInfrastructure

How it works

This workflow connects to Amazon CloudWatch (us-east-1 global endpoint) via the AWS CLI plugin to monitor the 5xxErrorRate metric for the target CloudFront distribution. When origin web servers, ALBs, or S3 origins crash, return gateway errors, or fail TLS handshakes, CloudFront propagates 5XX errors globally. When the error percentage exceeds the operational limit, an alert is sent to Slack with distribution details.

What you get

  • Global visibility into CDN delivery health across worldwide edge locations.
  • Proactive alerts before global visitors experience site-wide outages.
  • Immediate differentiation between origin outages and regional network issues.

Who it's for

  • CDN and Edge Infrastructure Engineers responsible for global content delivery and web availability.
  • SREs managing high-traffic web applications, e-commerce stores, and media streaming platforms.

Why orchestrate this with Kestra

  • Native CloudWatch Polling: Direct AWS CLI integration with zero external agent overhead.
  • Automated Origin Failover: Can be extended to automatically update CloudFront origin group failover settings.
  • Multi-Distribution Monitoring: Easily parameterize and monitor all corporate CDN distributions.

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. Supply your CloudFront distribution ID and configure secrets.
  3. Run the workflow to verify edge distribution health.

How to extend

  • Query OriginLatency alongside error rates to identify sluggish origins.
  • Automatically create CloudFront cache invalidations for updated assets.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.