exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 98 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 98
Topic #: 1
[All AWS Certified Developer Associate Questions]

A company is developing a report implemented using AWS Step Functions. Amazon CloudWatch shows errors in the Step Functions task state machine. To troubleshoot each task, the state input needs to be included along with the error message in the state output.
Which coding practice can preserve both the original input and the error for the state?

  • A. Use ResultPath in a Catch statement to include the error with the original input.
  • B. Use InputPath in a Catch statement and set the value to null.
  • C. Use ErrorEquals in a Retry statement to include the error with the original input.
  • D. Use OutputPath in a Retry statement and set the value to $.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Polu
Highly Voted 3 years, 7 months ago
A - "In some cases, you might want to preserve the original input with the error. Use ResultPath in a Catch to include the error with the original input, instead of replacing it."
upvoted 21 times
...
RicardoD
Highly Voted 3 years, 5 months ago
A is the answer The output of a state can be a copy of its input, the result it produces (for example, output from a Task state’s Lambda function), or a combination of its input and result. Use ResultPath to control which combination of these is passed to the state output.
upvoted 13 times
...
sumanshu
Most Recent 4 months, 1 week ago
Selected Answer: A
when an error occurs, you can use the Catch field to handle errors and preserve both the original input and the error details. The ResultPath field in a Catch block allows you to specify where in the state output the error information should be stored, alongside the original input.
upvoted 1 times
...
RachitNandi1997
1 year, 8 months ago
Selected Answer: A
A is the correct answer.
upvoted 1 times
...
rcaliandro
1 year, 10 months ago
Selected Answer: A
We can provide a catch block in your template in order to capture an eventual error during the execution. Once in the catch statement, we can use the result in "ResultPath" to include both the original input and the error. So, I vote for A!
upvoted 2 times
...
pancman
2 years, 1 month ago
Saw this question in the exam today.
upvoted 2 times
shasankperiwal
1 year, 10 months ago
So is it Option A?
upvoted 1 times
...
...
ShriniW
2 years, 2 months ago
WHy B is highlighted its not correct . The correct is option A , why null value have to be set .
upvoted 1 times
...
michele_scar
2 years, 3 months ago
Selected Answer: A
https://docs.aws.amazon.com/step-functions/latest/dg/input-output-resultpath.html#input-output-resultpath-catch
upvoted 2 times
...
Dirisme
2 years, 3 months ago
https://docs.aws.amazon.com/step-functions/latest/dg/input-output-resultpath.html
upvoted 2 times
...
cloud_collector
2 years, 6 months ago
Selected Answer: A
https://docs.aws.amazon.com/step-functions/latest/dg/input-output-resultpath.html#input-output-resultpath-catch
upvoted 3 times
...
szhang2004
2 years, 7 months ago
A is correct
upvoted 2 times
...
Hari008
2 years, 8 months ago
Selected Answer: A
A is correct
upvoted 2 times
...
Chinta
3 years, 6 months ago
A is correct
upvoted 2 times
...
saeidp
3 years, 6 months ago
A is correct
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago