Orchestrating data pipelines
DEA-C01 · Lesson 5 of 23 · 31:24
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the DEA-C01 exam (AWS Certified Data Engineer – Associate). In this lesson: schedules with EventBridge Scheduler, Glue triggers, and Apache Airflow, event-driven starts with S3 Event Notifications, EventBridge rules, and Glue workflows, orchestration with AWS Step Functions, Amazon MWAA, and Glue workflows, fault tolerance with retries, idempotent steps, and raw data kept in S3, and alerts with SNS and queues with SQS. Includes three original practice questions.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
A dozen steps every night
Every night, the pipeline of AnyCompany Games runs a dozen steps: copy the ad reports, crawl the new files, run three Glue jobs, load Redshift, and refresh the dashboards. When one step fails at three in the morning, someone must know, and the next steps must wait or retry. This lesson covers schedules, event triggers, orchestration services, resilient pipelines, and alerts.
Schedules
Some jobs run on the clock. Amazon EventBridge Scheduler starts targets with cron or rate expressions, or once at a set time, in the time zone that you choose, with retries and an optional flexible time window. Glue triggers can also be scheduled with cron, to start jobs and crawlers, for example a crawler every night at two, after the files land. In Apache Airflow, each DAG has its own schedule, and Amazon MWAA runs Airflow for you. A schedule is simple, but it does not know whether the data has arrived, so a late file means an empty run.
Event triggers
Event triggers start work when something happens. Amazon S3 Event Notifications send a message to Lambda, SQS, or SNS when an object is created, or send every event to EventBridge, where rules filter on the bucket, the prefix, or the file name. An EventBridge rule matches an event pattern, like a Glue job that changes state to failed, and sends it to one or more targets. A Glue workflow can start on a schedule, on demand, or on EventBridge events, even a batch of them, like waiting for one hundred new files before it runs. And Glue conditional triggers start a job when previous jobs or crawlers succeed, fail, or stop.
Orchestration services
An orchestrator runs the steps in order, passes results between them, and handles failures. AWS Step Functions is a serverless orchestrator whose state machines call Glue, EMR, Lambda, Athena, Redshift, and many other services directly: Standard workflows can run for up to a year, and Express workflows for up to five minutes, for high volumes of short tasks. A distributed map runs the same steps on thousands of files in S3, in parallel. Amazon MWAA runs Apache Airflow, for teams that write their DAGs in Python and use Airflow operators, with the DAG files stored in S3. And Glue workflows chain Glue jobs and crawlers with triggers, which suits a pipeline that stays inside Glue.
Resilient pipelines
A fault tolerant pipeline survives failures. In Step Functions, a Retry field tries a failed step again with an interval, a maximum number of attempts, and a backoff rate, and a Catch field sends errors to a fallback step, like a cleanup or an alert. Make each step idempotent, so that running it twice gives the same result: write to a dated partition and replace it, rather than adding rows to it. For availability, use managed services that run across Availability Zones, and keep the raw data in S3, so that any step can run again. For scalability and performance, process partitions in parallel, decouple the steps with queues, and let the services scale on their own.
Alerts
People must know when a pipeline breaks. Amazon SNS publishes a message to many subscribers at once, like an email list, a chat channel, and a Lambda function, so an EventBridge rule on failed Glue jobs, or a Catch step in Step Functions, sends the alert to an SNS topic. Amazon SQS keeps messages in a queue until a consumer processes them, which decouples the steps and absorbs bursts, and a dead-letter queue keeps the messages that keep failing. And fan-out from SNS to SQS delivers the same event to several queues, so that each team processes it at its own pace.
Recap
Let's recap. EventBridge Scheduler, Glue triggers, and Airflow run jobs and crawlers on cron schedules. S3 Event Notifications, EventBridge rules, and Glue workflows start work when data arrives. Step Functions, MWAA, and Glue workflows orchestrate the steps, and Step Functions is serverless. Retries with backoff, idempotent steps, and raw data in S3 make pipelines fault tolerant. And SNS sends alerts, while SQS queues work and keeps the messages that fail.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
Ad networks drop their reports in S3 at random times during the night. A Glue job must process each report as soon as it lands, and a schedule often runs before the files arrive. What should the data engineer use?
- A Glue scheduled trigger every fifteen minutes
- An EventBridge Scheduler schedule at 6 AM
- An EventBridge rule on Object Created events
- A longer timeout on the Glue job
Show the answer
An EventBridge rule on Object Created events
S3 sends an Object Created event to EventBridge, and the rule starts the job as soon as each report lands. “A Glue scheduled trigger every fifteen minutes” would run on a timer, with empty runs and delays. “An EventBridge Scheduler schedule at 6 AM” would wait for the morning, and still miss the files that come late. And “A longer timeout on the Glue job” would only let the job run longer, not start it at the right time.
A Step Functions workflow loads Redshift after a Glue job. The load step sometimes fails for a minute when the cluster is busy, then works on a second try. What should the data engineer add?
- A Catch field that ends the execution
- A Retry field with backoff on the load step
- An Express workflow instead of Standard
- A second Redshift cluster for the loads
Show the answer
A Retry field with backoff on the load step
A Retry field with a backoff rate waits a little longer before each new attempt, which fits a failure that passes on its own. “A Catch field that ends the execution” would stop the pipeline at the first error. “An Express workflow instead of Standard” is for short tasks in high volumes, and it changes nothing about the failure. And “A second Redshift cluster for the loads” would add cost and complexity for a problem of one minute.
The data team wants an email and a chat message whenever a Glue job of the pipeline fails, with no code to maintain. What should the data engineer set up?
- A CloudWatch dashboard of the job runs
- An SQS queue that the team reads every morning
- A Glue conditional trigger on failed jobs
- An EventBridge rule that sends to an SNS topic
Show the answer
An EventBridge rule that sends to an SNS topic
The rule matches the Glue jobs that change state to failed, and SNS delivers the alert to every subscriber. “A CloudWatch dashboard of the job runs” would show failures only to someone who looks at it. “An SQS queue that the team reads every morning” would hold the messages until someone reads them, which is not an alert. And “A Glue conditional trigger on failed jobs” would start another job, not notify anyone.