How should the solutions architect integrate these components?
Use Amazon SQS FIFO queues.
Use an AWS Lambda function along with Amazon SQS standard queues.
Create an SNS topic and subscribe an Amazon SQS FIFO queue to that topic.
Create an SNS topic and subscribe an Amazon SQS Standard queue to that topic.
Explanations:
Amazon SQS FIFO queues ensure that messages are processed in the exact order they are received and guarantee exactly-once processing, which is essential for maintaining order in a two-step order process. This option supports the requirement for low latency in the first step while handling the longer second step asynchronously.
While AWS Lambda can process messages from an SQS standard queue, standard queues do not guarantee message order or exactly-once processing. Therefore, this option does not meet the requirements of processing orders exactly once and in the order received.
Although using an SNS topic to fan out messages to an SQS FIFO queue can allow for ordered processing, SNS itself does not guarantee order, and if there were multiple subscribers, it could lead to out-of-order processing. The solution needs a mechanism that guarantees order throughout.
Subscribing an SQS Standard queue to an SNS topic does not provide ordering guarantees or exactly-once processing. Standard queues allow for at-least-once delivery and can lead to out-of-order processing, which violates the requirements for the order process.