Q68 — AWS DOP-C02 Ch.3
Question 68 of 100 | ← Chapter 3
A company runs a batch-processing application to handle records. Application components run on Amazon EC2 instances in an Auto Scaling group. Each record’s processing consists of multiple sequential steps, each with predictable duration. Each step completes within five minutes or less.
- A. Create a web application that writes records to Amazon S3. Use S3 event notifications to publish to an Amazon Simple Notification Service (Amazon SNS) topic. Use an EC2 instance to poll Amazon SNS and initiate processing. Save intermediate results to Amazon S3 after each step.
- B. Implement logic in the application to execute processing steps. Refactor the application code to run in containers and use AWS Fargate to manage container instances. Configure containers to invoke themselves to pass state from one step to the next.
- C. Create a web application that sends records to Amazon Kinesis Data Streams. Leverage Kinesis Data Streams and AWS Lambda functions to decouple processing.
- D. Create a web application that sends records to AWS Step Functions. Decompose processing into Step Functions tasks and AWS Lambda functions. ✓
Correct Answer: D. Create a web application that sends records to AWS Step Functions. Decompose processing into Step Functions tasks and AWS Lambda functions.
Explanation
AWS Step Functions is a workflow service for orchestrating distributed application components, enabling multi-step, stateful processes with built-in error handling and retry capabilities. The requirement is to reprocess only failed steps—not the entire record—upon failure. Option D leverages Step Functions to model each processing step as an independent task executed by Lambda functions; the state machine automatically tracks execution status and allows precise, step-level retries with persistent intermediate state. Other options lack native step-level recovery: A relies on manual state tracking via S3/SNS, B introduces unnecessary complexity with self-invoking containers, and C focuses on streaming rather than orchestrated, stateful step management. AWS documentation confirms Step Functions is ideal for multi-step, stateful, fault-tolerant workloads where failure points require targeted recovery.