AwsCLI icon
If icon
SlackIncomingWebhook icon
Schedule icon

AWS Step Functions State Machine Execution Failure Sentinel

Audits AWS Step Functions CloudWatch metrics to detect failed state machine executions and workflow aborts.

Categories
CloudInfrastructure

How it works

This sentinel leverages AwsCLI to query CloudWatch for the ExecutionsFailed metric on the specified Step Functions state machine over rolling 15-minute periods. It detects workflow crashes, task timeouts, and caught exceptions, notifying pipeline maintainers before business processes stall.

What you get

  • Continuous validation of asynchronous business workflow executions.
  • Rapid alerting on unhandled task exceptions or external dependency failures.
  • Automated Slack delivery detailing state machine ARN and failed execution count.

Who it's for

  • Cloud engineers and backend developers coordinating distributed microservice workflows.
  • SREs maintaining mission-critical order processing and data ingest pipelines.

Why orchestrate this with Kestra

Kestra runs automated scheduled operational health checks with native error handling, secret injection, and multi-channel alerting.

Prerequisites

  • AWS IAM credentials with cloudwatch:GetMetricStatistics 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. Configure state_machine_arn, aws_region, and credentials.
  3. Run manually to check current failure rates.

How to extend

  • Query aws stepfunctions list-executions --status-filter FAILED to include the exact failure cause and input payload.
  • Trigger an automated retry subflow for transient dependency errors.
  • Forward failure metrics to Datadog or Prometheus.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.