An application is experiencing inconsistent response times and higher error rates because synchronous calls to third-party services (invoked by an AWS Lambda function) are causing delays. You need to decouple third-party calls and ensure all calls are eventually completed. What is the appropriate solution?
Choose an answer
Tap an option to check your answer.
Correct answer: Use an Amazon SQS queue to store events and have the Lambda function be invoked to process messages from the queue..
Why this is the answer
Using an Amazon SQS queue is the most appropriate solution for decoupling synchronous calls and ensuring eventual completion. SQS is a message queuing service that allows the Lambda function to quickly send messages (representing third-party calls) to the queue without waiting for a response. Another Lambda function can then asynchronously process these messages from the queue, retrying failed calls as needed, which improves resilience and ensures all calls are eventually completed. AWS Step Functions is designed for orchestrating complex workflows, not simply decoupling individual calls. Amazon EventBridge is a serverless event bus for routing events between services, but it doesn't inherently provide the message persistence and retry mechanisms of SQS for ensuring eventual completion of individual calls. Amazon SNS is a publish/subscribe messaging service, primarily for fan-out scenarios, and lacks the message queuing and retry capabilities of SQS for reliable asynchronous processing and guaranteed delivery.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed