A developer is implementing a decoupled transaction processing system. Transaction event messages are published to an Amazon SNS FIFO topic. An Amazon SQS FIFO queue is subscribed to the topic, and an AWS Lambda function consumes messages from the queue.
The system must satisfy these requirements:
- Transactions for the same bank account must be processed in the exact order they are received.
- If duplicate transactions with the exact same payload are published within a -minute window, only the first transaction should be processed.
- The AWS Lambda function takes up to seconds to process a single transaction.
During testing, the developer notices two issues:
1. Transactions for the same bank account are sometimes processed out of order.
2. Transactions that take longer than seconds to process are occasionally processed a second time by another Lambda invocation.
Which two of the following configuration changes will resolve these issues? (Select TWO.)
- Set the MessageGroupId of each published message to the unique bank account ID.Answer
- Set the Lambda function timeout to seconds and configure the SQS queue's visibility timeout to at least seconds.Answer
- CConfigure the SQS queue's visibility timeout to seconds to ensure that any failed transaction processing is retried immediately.
- DSet the MessageDeduplicationId of each published message to the unique bank account ID.
- EIncrease the Lambda function timeout to seconds and reduce the SQS queue's visibility timeout to seconds.