Question 989 of 724
DVA-C02 Development with AWS Services Practice Question
A developer is using AWS Step Functions to orchestrate a workflow that includes a Lambda function for data transformation. The Lambda function occasionally times out after 15 seconds. The Step Function execution fails with a 'States.Timeout' error. The developer wants to retry the Lambda task up to 3 times with exponential backoff. Which configuration should the developer add to the state definition in the Amazon States Language (ASL)?
⚠ Common exam trap
Many candidates confuse the error name for a Lambda timeout ('States.Timeout') with service-specific errors like 'Lambda.ServiceException', or misconfigure the retry count or backoff rate to not match the exact requirement.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
"Retry": [ { "ErrorEquals": ["States.Timeout"], "IntervalSeconds": 1, "BackoffRate": 2, "MaxAttempts": 3 } ]
It defines a retry policy for the 'States.Timeout' error, which is the error that occurs when the Lambda function times out. The configuration sets a 1-second initial interval, doubles the interval on each retry (BackoffRate of 2), and allows up to 3 retries, matching the requirement exactly.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
"Retry": [ { "ErrorEquals": ["States.Timeout"], "IntervalSeconds": 1, "BackoffRate": 2, "MaxAttempts": 3 } ]
Why this is correct
This configuration correctly specifies a retry mechanism for the `States.Timeout` error, which occurs when a state's execution exceeds its defined timeout. It initiates the first retry after 1 second, employing an exponential backoff strategy by doubling the interval (`BackoffRate: 2`) for subsequent attempts. The `MaxAttempts: 3` ensures that the state will be retried up to three times before ultimately failing, providing a robust handling for transient timeout conditions.
- ✗
"Retry": [ { "ErrorEquals": ["States.Timeout"], "IntervalSeconds": 2, "BackoffRate": 3, "MaxAttempts": 5 } ]
Why it's wrong here
While this configuration correctly targets the `States.Timeout` error, the `MaxAttempts` value of 5 is typically excessive for transient timeout scenarios and deviates from common best practices or implicit requirements for a specific number of retries. An overly aggressive retry count can unnecessarily prolong state machine execution, consume more resources, and delay the detection of persistent issues that require human intervention rather than automated retries.
- ✗
"Retry": [ { "ErrorEquals": ["States.Timeout"], "IntervalSeconds": 1, "BackoffRate": 2, "MaxAttempts": 2 } ]
Why it's wrong here
This retry configuration accurately identifies `States.Timeout` as the error to handle and employs an appropriate exponential backoff strategy with an initial `IntervalSeconds` of 1 and a `BackoffRate` of 2. However, setting `MaxAttempts` to 2 is insufficient if the problem context implies a need for up to three retries. This configuration would cause the state to fail prematurely after only two retries, potentially missing an opportunity to recover from a temporary service disruption that might resolve on a third attempt.
- ✗
"Retry": [ { "ErrorEquals": ["Lambda.ServiceException"], "IntervalSeconds": 1, "BackoffRate": 2, "MaxAttempts": 3 } ]
Why it's wrong here
This configuration is incorrect because it attempts to catch `Lambda.ServiceException`, which is an error specific to AWS Lambda service issues, such as internal errors or throttling. The problem statement indicates that the error to be handled is `States.Timeout`, an intrinsic Step Functions error that signifies a state has exceeded its allocated execution time. Consequently, this retry block would never activate for the intended `States.Timeout` error, leading to an unhandled failure in the workflow.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jul 4, 2026
This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.