DVA-C02 practice question 2 of 35
A developer migrated a legacy application to an AWS Lambda function. The function uses a third- party service to pull data with a series of API calls…
Full set: 598 questionsDomain Security
AWS Step Functions is the ideal service for orchestrating long-running, stateful, and resilient serverless workflows. The scenario describes a process that may now take multiple days, exceeding the 15-minute AWS Lambda execution limit. A Step Functions state machine can manage the overall process state for up to a year. It can invoke the Lambda function to make API calls, use its built-in Catch mechanism to handle specific throttling errors returned by the third-party service, and then transition to a Wait state to pause execution. This creates a robust loop that respects the API rate limits (both per-minute and daily) without losing progress, making it the most operationally efficient solution.
B: Amazon SQS is for decoupling components, not for orchestrating a multi-day stateful workflow. Managing the overall process state and daily limits would require complex custom logic. C: This is a destructive and reactive approach. Abruptly stopping a Lambda function via a CloudWatch alarm would cause the loss of any in-progress work and state. D: Amazon Kinesis Data Firehose is a service for ingesting and delivering streaming data. It is not designed for making outbound API calls or managing workflow orchestration.
1. AWS Step Functions Developer Guide, "What is AWS Step Functions?": This document introduces Step Functions as a serverless orchestration service for coordinating components of distributed applications, including AWS Lambda functions, which is the core requirement of the question.
2. AWS Step Functions Developer Guide, "Error handling in Step Functions": This section details the use of Retry and Catch fields within a state definition. This directly supports the solution of catching API throttling errors and taking corrective action, such as waiting.
3. AWS Step Functions Developer Guide, "Wait state": This page describes the Wait state, which "delays the state machine from continuing for a specified time." This is the mechanism used to pause the workflow to comply with the third-party service's rate limits.
4. AWS Lambda Developer Guide, "Lambda quotas": Under the "Lambda function configuration, deployment, and execution quotas" table, the Timeout is listed with a maximum value of 900 seconds (15 minutes). This confirms that a single Lambda function cannot handle a process that runs for multiple days, necessitating an orchestrator like Step Functions.
Keep practicing
Take the free DVA-C02 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DVA-C02 practice questions
- Question 1A company has a multi-node Windows legacy application that runs on premises. The applicat…
- Question 3A development learn has an Amazon API Gateway REST API that is backed by an AWS Lambda fu…
- Question 4A company is expanding the compatibility of its photo-snaring mobile app to hundreds of a…
- Question 5A company has an ecommerce application. To track product reviews, the company's developme…
- Question 6A social media company is designing a platform that allows users to upload data, which is…
- Question 7A developer is creating an Amazon DynamoDB table by using the AWS CLI The DynamoDB table …
