Medium1 markMultiple Choice
Domain 2.4: Reliability RequirementsStep FunctionsServerlessReliability

AWS SAP-C02 · Question 33 · Domain 2.4: Reliability Requirements

A company is building a serverless application using AWS Step Functions to orchestrate a complex workflow. One of the steps involves calling an external third-party API that is known to be unreliable and frequently times out. The workflow must not fail immediately; it should retry the API call up to 5 times, waiting longer between each attempt. How should the architect implement this?

Answer options:

A.

Write custom retry logic with Thread.sleep() inside the AWS Lambda function that calls the API.

B.

Configure the Retry field in the Step Functions Task state with an IntervalSeconds and a BackoffRate.

C.

Use an Amazon SQS queue with a visibility timeout to delay the retries.

D.

Configure AWS App Mesh to intercept the API call and apply a retry policy.

How to approach this question

Identify the native orchestration feature for retries.

Full Answer

B.Configure the Retry field in the Step Functions Task state with an IntervalSeconds and a BackoffRate.✓ Correct
Configure the Retry field in the Step Functions Task state with an IntervalSeconds and a BackoffRate.
AWS Step Functions allows you to define Retry logic directly in the state machine definition. You can specify the number of MaxAttempts, the initial IntervalSeconds, and a BackoffRate to implement exponential backoff without writing custom code or paying for idle compute.

Common mistakes

Implementing retries inside Lambda, which increases AWS bill due to idle wait time.

Practice the full AWS Solutions Architect Professional SAP-C02 Practice Exam 4

75 questions · hints · full answers · grading

More questions from this exam