Reliable Data Pipelines
What happens when a snapshot fails to reach the reporting pipeline?
My Role
I implemented and maintained the copy, transformation, and recovery workflow described below, including Lambda failure handling, dead-letter queue recovery, and CloudWatch log-based troubleshooting.
The Problem
A snapshot fails to reach the reporting pipeline, or overlapping processing leaves data incompletely processed. Downstream dashboards show stale numbers, and operators don't know whether the data they're looking at is complete.
How It Worked
Simplified reconstruction of a pipeline I implemented and maintained1. Normal processing
The source team publishes a snapshot and an SNS notification invokes the copy Lambda. A successful copy lands in the landing bucket, which triggers the processing Lambda to write partitioned Parquet.
Loading diagram…
2. Failed-copy recovery
A failed copy reaches the dead-letter queue through Lambda asynchronous failure handling. Recovery checks whether the target file exists before copying again. This check does not prove downstream processing finished.
Loading diagram…
3. Reporting selection
If several snapshots exist for the same reporting interval, the latest timestamp is selected for the reporting view.
Loading diagram…
This diagram shows the reliability behavior of the snapshot pipeline. Failed copy invocations reach the dead-letter queue through configured asynchronous failure handling. Recovery checks whether the target file already exists before retrying the copy — this prevents unnecessary recopying. Recovered snapshots re-enter the normal landing-bucket and transformation path. CloudWatch logs support troubleshooting.
Example: A snapshot for the 02:00 hour fails to copy. The copy Lambda invocation raises an error; after configured asynchronous failure handling, the unsuccessful event reaches the dead-letter queue. Recovery checks the destination — the file does not exist — and retries the copy. The snapshot lands in the landing bucket, triggers the processing Lambda, and becomes available in the production Parquet partition. If multiple snapshots exist for the same reporting interval, the latest timestamp is selected. How ties between identical timestamps were broken is not documented here.
Evidence status: This reconstruction is based on my own account of systems I built and maintained. The historical source code and configuration are not available for publication, so these details are owner-confirmed, not independently verified.
Design Decisions
Destination-existence checks prevent unnecessary copy retries — they do not, by themselves, demonstrate that downstream transformation completed. Latest-timestamp selection chooses the reporting snapshot. These are separate mechanisms.
Unsuccessful copy invocations reach the dead-letter queue through configured asynchronous failure handling. Lambda retries a failed asynchronous invocation twice by default before it sends the event to the dead-letter queue, so an error does not reach the queue at once.
Results
Failed copies are detected and retried. Recovered snapshots re-enter the normal processing path. Multiple snapshots for the same interval are reduced to the latest observation. CloudWatch logs provide visibility into failures and recovery.
AWS documentation
How Lambda handles errors and retries with asynchronous invocation and capturing records of failed asynchronous invocations describe the retry and dead-letter queue behavior used here.
See the code
I rebuilt these recovery patterns as a public work sample with synthetic data, Terraform, and tests, and ran it live on AWS: A pipeline that doesn't lose data.
Working through a similar problem?
Discuss a project →