AWS Certified Solutions Architect – Professional (SAP-C02) — Question 97
A company is running an application in the AWS Cloud. Recent application metrics show inconsistent response times and a significant increase in error rates. Calls to third-party services are causing the delays. Currently, the application calls third-party services synchronously by directly invoking an AWS Lambda function.
A solutions architect needs to decouple the third-party service calls and ensure that all the calls are eventually completed.
Which solution will meet these requirements?
Answer options
- A. Use an Amazon Simple Queue Service (Amazon SQS) queue to store events and invoke the Lambda function.
- B. Use an AWS Step Functions state machine to pass events to the Lambda function.
- C. Use an Amazon EventBridge rule to pass events to the Lambda function.
- D. Use an Amazon Simple Notification Service (Amazon SNS) topic to store events and Invoke the Lambda function.
Correct answer: A
Explanation
The correct answer is A because using Amazon SQS allows for asynchronous processing of requests, storing events in the queue to be processed by the Lambda function when resources are available, thereby decoupling the service calls. Options B, C, and D do not provide the same level of decoupling and guaranteed processing of events as SQS does, making them less suitable for the requirements.