ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 91 - SAP-C02 discussion

Report
Export

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?

A.
Use an Amazon Simple Queue Service (Amazon SQS) queue to store events and invoke the Lambda function.
Answers
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.
Answers
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.
Answers
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.
Answers
D.
Use an Amazon Simple Notification Service (Amazon SNS) topic to store events and Invoke the Lambda function.
Suggested answer: A

Explanation:

Using an SQS queue to store events and invoke the Lambda function will decouple the third-party service calls and ensure that all the calls are eventually completed. SQS allows you to store messages in a queue and process them asynchronously, which eliminates the need for the application to wait for a response from the third-party service. The messages will be stored in the SQS queue until they are processed by the Lambda function, even if the Lambda function is currently unavailable or busy. This will ensure that all the calls are eventually completed, even if there are delays or errors.

AWS Step Functions state machines can also be used to pass events to the Lambda function, but it would require additional management and configuration to set up the state machine, which would increase operational overhead.

Amazon EventBridge rule can also be used to pass events to the Lambda function, but it would not provide the same level of decoupling and reliability as SQS.

Using Amazon Simple Notification Service (Amazon SNS) topic to store events and Invoke the Lambda function, is similar to SQS, but SNS is a publish-subscribe messaging service and SQS is a queue service. SNS is used for sending messages to multiple recipients, SQS is used for sending messages to a single recipient, so SQS is more appropriate for this use case.

AWS SQS

AWS Step Functions

AWS EventBridge

AWS SNS

asked 16/09/2024
Haleem SHITOU OGUNGBEMI
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first