Topic 1 Question 486
A developer is creating an AWS Step Functions state machine to handle an order processing workflow. When the state machine receives an order, the state machine pauses until the order has been confirmed. A record that is added to an Amazon DynamoDB table by another service confirms each order.
The developer must complete the order processing workflow.
Which solution will meet this requirement?
Update the state machine to query the DynamoDB table by using the DynamoDB GetItem state to determine whether a record exists. If the record does exist, continue to the next state. If the record does not exist, wait 5 minutes and check again.
Subscribe an AWS Lambda function to a DynamoDB table stream. Configure the Lambda function to run when a new record is added to the table. When the Lambda function receives the appropriate record, run the redrive execution command on the running state machine.
Subscribe an AWS Lambda function to the DynamoDB table stream. Configure the Lambda function to run when a new record is added to the table. When the Lambda function receives the appropriate record, stop the current state machine invocation and start a new invocation.
Invoke an AWS Lambda function from the state machine. Configure the Lambda function to continuously poll the DynamoDB table for the appropriate record and to return when a record exists. Continue the state machine invocation when the Lambda function returns. If the Lambda function times out, then fail the state machine.
ユーザの投票
コメント(2)
- 正解だと思う選択肢: A
A is the correct answer. Because AWS Step Functions provides native integration with Amazon DynamoDB, allowing the state machine to directly query a DynamoDB table using the DynamoDB GetItem state. This approach enables a wait-and-retry mechanism, which is ideal for workflows where the state machine needs to wait for a confirmation record to appear in the DynamoDB table. B is wrong. Because while this could work, it adds unnecessary complexity. The redrive execution command involves restarting the state machine, which is not ideal for workflows designed to wait for an event.
👍 1Arad2025/01/10 - 正解だと思う選択肢: B
B. Use DynamoDB streams, then lambda subscribe the stream and redrive state machine
👍 10bdf3af2025/03/06
シャッフルモード