AWS Certified Developer – Associate (DVA-C02)Development with AWS ServicesHard
A developer is implementing a new feature for an existing application that involves processing a large number of independent tasks. Each task can take a variable amount of time (from seconds to minutes) and needs to be processed in a fault-tolerant manner, even if the primary processing instance fails. The application should be able to scale horizontally to handle varying loads. Which AWS service is MOST appropriate for orchestrating and managing these tasks?
- AAmazon Simple Workflow Service (SWF)
- BAmazon SQS
- CAWS Lambda
- DAWS Step Functions
Show answer & explanationAnswer & explanation
Correct answer: D. AWS Step Functions
AWS Step Functions is designed for orchestrating distributed applications and microservices using visual workflows. It provides state management, error handling, retries, and can coordinate multiple long-running tasks, ensuring fault tolerance and scalability, which fits the requirements better than simple queues or individual functions.
Why the other options are wrong
- A. SWF is an older workflow service. Step Functions is the modern, serverless successor, offering a more intuitive visual workflow and easier integration with other AWS services, making it a better choice for new development.
- B. SQS is a message queue for decoupling, but it doesn't provide orchestration, state management, or complex workflow logic for coordinating multiple tasks.
- C. Lambda is for individual serverless functions. While it can be part of a workflow, it doesn't provide the orchestration logic, state management, or inherent fault tolerance across multiple steps itself.
AWS Step Functions
A serverless workflow service that lets you combine AWS Lambda functions and other AWS services to build business-critical applications. You design workflows as state machines.
- Manages state between steps.
- Provides built-in error handling, retries, and parallelism.
- Visual workflow definition (ASL - Amazon States Language).
- Orchestrates distributed applications.
Memory trick: Steps are like a map; they tell your functions where to go and what to do next.