Q66 — AWS SAP-C02 Ch.1

Question 66 of 75 | ← Chapter 1

Q141. 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 cals are eventually completed.Which solution will meet these requirements?

Correct Answer: A. Use an Amazon Simple Queue Service(Amazon SQS) queue to store events and invoke the Lambda function

Explanation

The solution that will meet the requirements is Option A:-- Use Amazon SQS to store events. This decouples the third-party service calls from the application and ensures that all calls are eventually completed.-- Configure an AWS Lambda function to poll the SQS queue for new messages. Once a message is received, the Lambda function can invoke the appropriate third-party service asynchronously.-- Configure a dead-letter queue to capture and automatically handle failed messages.Option B involves using Step Functions, which may be overkill for this scenario as it introduces additional complexity into the application architecture.Option C involves using EventBridge, which is primarily used for event-driven architectures. While it can be used to pass events to a Lambda function, its primary use case is not related to decoupling third-party service calls. Option D involves using SNS, which publishes messages to subscribers. While it can be used to store events, it does not provide the same level of durability or flexibility as SQS.Therefore, Option A is the most appropriate choice for decoupling third-party service calls and ensuring that all calls are eventually completed.