Courseiva
Development with AWS ServiceseasyMultiple SelectObjective-mapped

DVA-C02 Development with AWS Services Practice Question

A developer is using AWS Step Functions to orchestrate a workflow. The developer wants to handle errors and retries for a task. Which TWO fields can be used in a state definition to configure error handling? (Choose TWO.)

⚠ Common exam trap

Candidates often confuse the `Retry` and `Catch` fields with non-existent fields like `FailureState` or `ErrorAction`, or they mistakenly think `ErrorOutput` is used to capture error details, when in fact Step Functions uses `ResultPath` to include error information in the state output.

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

The `Retry` field in an AWS Step Functions state definition defines an array of retry policies, specifying which errors to retry, the maximum number of retry attempts, the interval between retries, and the backoff rate. Option B is correct because the `Catch` field defines an array of fallback states or state machine transitions that are executed when a specific error occurs after all retry attempts are exhausted, allowing the workflow to handle errors gracefully.

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

    Why this is correct

    In AWS Step Functions, the "Retry" field within a state definition allows a developer to specify a retry policy for transient errors. It defines which errors ("ErrorEquals"), how many times ("MaxAttempts"), and with what delay ("IntervalSeconds" and "BackoffRate") the state should be re-executed before failing. This mechanism is crucial for building resilient workflows that can automatically recover from temporary issues without manual intervention.

  • Catch

    Why this is correct

    The "Catch" field in an AWS Step Functions state definition provides a mechanism to handle specific errors gracefully by transitioning to a different state. It allows developers to define an array of catchers, each specifying which errors ("ErrorEquals") to intercept and which subsequent state ("Next") to transition to for custom error recovery logic. This enables branching workflows based on error types, preventing the entire state machine from failing.

  • FailureState

    Why it's wrong here

    "FailureState" is not a valid or recognized field within the Amazon States Language (ASL) used by AWS Step Functions. While the concept of handling failures is central to robust workflows, ASL provides specific mechanisms like the "Catch" field to transition to an error handling state or the "Fail" state type to explicitly terminate an execution as a failure. This option represents a non-existent construct in the Step Functions specification.

  • ErrorOutput

    Why it's wrong here

    "ErrorOutput" is not a valid field in AWS Step Functions. When an error occurs and is caught by a "Catch" clause, the error information (including "Error" and "Cause" fields) is typically made available in the state's output, often using the "ResultPath" field to merge it with the original input or place it in a specific location. There is no dedicated "ErrorOutput" field for defining how error data is structured or passed.

  • ErrorAction

    Why it's wrong here

    "ErrorAction" is not a standard or recognized field in the Amazon States Language (ASL) for AWS Step Functions. Step Functions provides specific, well-defined mechanisms for responding to errors, primarily through the "Retry" field for transient error re-execution and the "Catch" field for transitioning to alternative states for custom error handling logic. This option suggests a generic error handling field that does not exist in the ASL specification.

About these practice questions

Courseiva writes every DVA-C02 question from scratch — 724 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.