New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Amazon DVA-C02 Exam - Topic 5 Question 30 Discussion

Actual exam question for Amazon's DVA-C02 exam
Question #: 30
Topic #: 5
[All DVA-C02 Questions]

A developer is using AWS Step Functions to automate a workflow The workflow defines each step as an AWS Lambda function task The developer notices that runs of the Step Functions state machine fail in the GetResource task with either an UlegalArgumentException error or a TooManyRequestsException error

The developer wants the state machine to stop running when the state machine encounters an UlegalArgumentException error. The state machine needs to retry the GetResource task one additional time after 10 seconds if the state machine encounters a TooManyRequestsException error. If the second attempt fails, the developer wants the state machine to stop running.

How can the developer implement the Lambda retry functionality without adding unnecessary complexity to the state machine'?

Show Suggested Answer Hide Answer
Suggested Answer: C

Step Functions Retriers: Retriers provide a built-in way to gracefully handle transient errors within State Machines. Here's how to use them:

Directly attach a retrier to the problematic 'GetResource' task.

Configure the retrier:

ErrorEquals:Set this to ['TooManyRequestsException'] to target the specific error.

IntervalSeconds:Set to 10 for the desired retry delay.

MaxAttempts:Set to 1, as you want only one retry attempt.

Error Handling:

Upon 'TooManyRequestsException', the retrier triggers the task again after 10 seconds.

On a second failure, Step Functions moves to the next state or fails the workflow, as per your design.

'IllegalArgumentException' causes error propagation as intended.


Error Handling in Step Functions:https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html

Contribute your Thoughts:

0/2000 characters
Amie
3 months ago
Isn't there a risk of infinite retries with TooManyRequests?
upvoted 0 times
...
Rosendo
3 months ago
Totally agree with C, less complexity is key!
upvoted 0 times
...
Lazaro
3 months ago
Wait, why would you duplicate the task? That sounds messy.
upvoted 0 times
...
Rosendo
4 months ago
I think A is better for clarity.
upvoted 0 times
...
Pamella
4 months ago
Option C seems like the cleanest solution.
upvoted 0 times
...
Alonzo
4 months ago
I vaguely remember that duplicating tasks can lead to more complexity. I think we should avoid that option, but I can't recall the exact reasons.
upvoted 0 times
...
Skye
4 months ago
I feel like adding a Delay task could complicate the workflow unnecessarily. I’m leaning towards using a catcher instead, but I’m not entirely confident.
upvoted 0 times
...
Louann
4 months ago
I think we practiced a similar question where we had to manage retries. If I recall correctly, using a retrier might simplify things without adding extra steps.
upvoted 0 times
...
Irma
5 months ago
I remember we discussed how to handle exceptions in Step Functions, but I'm not sure if a retrier or a catcher is the best approach here.
upvoted 0 times
...
Jettie
5 months ago
This looks like a good opportunity to demonstrate my understanding of AWS Step Functions and error handling. I think option C is the most straightforward and efficient solution, but I'll double-check the other options to be sure.
upvoted 0 times
...
Sage
5 months ago
I'm not sure I fully understand the difference between the options. I'll need to carefully read through each one and make sure I understand the implications before selecting an answer.
upvoted 0 times
...
Kerry
5 months ago
Okay, let me think this through step-by-step. I need to handle the UlegalArgumentException error by stopping the state machine, and the TooManyRequestsException error by retrying the task once after 10 seconds. I think option A or B might work for that.
upvoted 0 times
...
Noble
5 months ago
Hmm, I'm a bit confused about the difference between a catcher and a retrier. I'll need to review that before deciding on the best approach.
upvoted 0 times
...
Blondell
5 months ago
This seems like a pretty straightforward question. I think I can handle this one.
upvoted 0 times
...
Stefany
5 months ago
This looks like a tricky BGP configuration question. I'll need to carefully review the options and think through the correct family and neighbor settings.
upvoted 0 times
...
Leonie
5 months ago
Hmm, I'm a bit unsure about the difference between available stock and released receipts. I'll need to think this through carefully.
upvoted 0 times
...
Keneth
2 years ago
Option B it is! No need to reinvent the wheel when AWS gives us the tools to handle this gracefully.
upvoted 0 times
Berry
1 year ago
That's true, sticking to the recommended approach will also make it easier for future maintenance and troubleshooting.
upvoted 0 times
...
Junita
1 year ago
I agree, it's important to leverage the existing functionality to keep the state machine logic simple and effective.
upvoted 0 times
...
Kristian
1 year ago
Exactly! AWS provides built-in features like catchers and maximum attempts to handle errors efficiently.
upvoted 0 times
...
Carmen
2 years ago
Option B it is! No need to reinvent the wheel when AWS gives us the tools to handle this gracefully.
upvoted 0 times
...
...
Sherman
2 years ago
I see your point, but I still think having a separate task for retrying is more clear in this case.
upvoted 0 times
...
Helga
2 years ago
But wouldn't duplicating tasks add unnecessary complexity to the state machine?
upvoted 0 times
...
Sherman
2 years ago
I disagree, I believe option D is better. Duplicating the task and retrying with TryAgain seems more straightforward.
upvoted 0 times
...
Valentin
2 years ago
Option D seems a bit convoluted. Duplicating the task and adding a catcher feels like overkill for this use case.
upvoted 0 times
...
Gary
2 years ago
I like how Option C uses the built-in retrier functionality of Step Functions. Keeps the state machine clean and easy to maintain.
upvoted 0 times
Maybelle
2 years ago
Absolutely, keeping things clean and simple is key when working with workflows.
upvoted 0 times
...
Olene
2 years ago
It definitely makes the state machine easier to manage in the long run.
upvoted 0 times
...
Janey
2 years ago
I agree, using the retrier functionality built into Step Functions is a smart choice.
upvoted 0 times
...
Mari
2 years ago
Option C is definitely the way to go. It's simple and efficient.
upvoted 0 times
...
...
Helga
2 years ago
I think option A is the best choice. Adding a Delay task after GetResource seems like a simple solution.
upvoted 0 times
...
Alfred
2 years ago
Option B looks like the simplest and most straightforward way to handle the retries. No need to add extra tasks or complexity.
upvoted 0 times
Pok
2 years ago
Yeah, I think adding a catcher to the GetResource task for TooManyRequestsException with a maximum attempts value of 1 is a clean solution.
upvoted 0 times
...
Tasia
2 years ago
I agree, option B seems like the best choice here. It keeps it simple and handles the retries efficiently.
upvoted 0 times
...
...

Save Cancel