Lesson 4 of 4 Monitoring and Troubleshooting Pipelines

Alerting on Silent Pipeline Failures and Stale Data

This lesson explains how monitoring catches both loud pipeline failures, job errors, and silent ones, runs that write nothing, repeat yesterday's data or finish hours late, and routes alerts to people who can act.

Learning outcomes

After completing this lesson, you will be able to:

  • Alert on failed job states with EventBridge.
  • Detect silent failures from missing data, stale timestamps and volume changes.
  • Investigate alerts with logs and audit records.

Loud failures

Glue, EMR, Step Functions, MWAA (through Airflow callbacks) and DataBrew emit state change events. EventBridge rules matching FAILED, TIMEOUT or aborted states send alerts to SNS, chat channels or an incident tool, and can trigger automatic retries or cleanup. Step Functions Catch states can notify and record failures within the workflow.

True or false

Loud failures

Exam skills 3.3.3

Decide whether each statement about alerting on failures is true.

Log in to try this activity Interactive activities are free with an account.

Silent failures

The most dangerous pipeline failures raise no error, so alarms must watch the data as well as the jobs. When no data arrives, there is nothing to fail. Publish a custom metric, such as rows loaded or files received, and set its alarm to treat missing data as breaching, so that silence triggers it. Stale data is detected by comparing the newest event timestamp in the target with the current time.

A sudden drop or spike in volume often means a broken source or a duplicated load, and anomaly detection, in CloudWatch or through Glue Data Quality dynamic rules, flags counts outside the normal range. A job that succeeds but takes far longer than usual is caught by comparing duration with a baseline, and stream consumers falling behind are caught by alarms on iterator age or consumer lag. The following table summarises the signals.

SymptomSignal to monitor
No data arrivedCustom metric (rows loaded, files received) with a missing-data alarm treated as breaching
Data is staleLatest event timestamp in the target, compared with now
Volume dropped or spikedRow count anomaly detection (CloudWatch anomaly detection, Glue Data Quality dynamic rules)
Job ran but took far longerJob duration metrics against a baseline
Stream consumers behindIterator age or consumer lag alarms

The following diagram shows the rows loaded each night and the job status.

Three nights of empty files. The job reported success every night, so job-failure alerts stayed silent while rows loaded fell to zero. An alarm on a rows-loaded metric, below a threshold or missing and treated as breaching, or a Glue Data Quality rule such as RowCount > 0, would have flagged the first empty night.
The row counts are illustrative.
Match the pairs

Silent failure signals

Exam skills 3.3.3 · 3.4.1

Match each silent failure with the signal that catches it.

Log in to try this activity Interactive activities are free with an account.

Logs and investigation

Once an alert fires, logs and audit records explain what happened. Job logs from Glue, EMR, Lambda and other services are centralised in CloudWatch Logs and searched with CloudWatch Logs Insights, which can query many log groups at once, for example to find every error across a pipeline's jobs in the hour before a failure.

AWS CloudTrail shows who changed a job, table, permission or schedule before the failure, which often explains a pipeline that broke without any code change. For Spark jobs, the Spark UI and Glue job run insights explain slow or failing stages. For Redshift, system tables such as SYS_LOAD_ERROR_DETAIL and SYS_QUERY_HISTORY explain why a COPY rejected rows or a query failed.

Scenario questions

Investigating a failure

Exam skills 3.3.1 · 3.3.5 · 4.4.5

Choose where to look for each question.

Log in to try this activity Interactive activities are free with an account.
Worked example

A nightly pipeline reports success every day, but last week an upstream system sent empty files for three nights and nobody noticed until a monthly report was wrong.

Job-failure alerts cannot catch this. Publish a rows-loaded metric from the pipeline and alarm when it is below a threshold or missing, or add a Glue Data Quality rule such as RowCount > 0 (or a dynamic rule comparing with recent runs) that fails the run.

Check yourself

Why treat missing data as breaching in a freshness alarm?

Show answer

If a pipeline stops producing data, there is no metric to evaluate; treating missing data as breaching makes the alarm fire.

Exam Tips

Remember for the exam

  • Route job state change events (FAILED, TIMEOUT) from EventBridge to notifications.
  • Monitor data volume and freshness with custom metrics; treat missing data as breaching.
  • Use anomaly detection or dynamic data quality rules for unexpected volume changes.
  • Logs Insights, CloudTrail, Spark UI and Redshift system tables support troubleshooting.
  • A successful job is not proof of correct data.