AWS Certified Solutions Architect – Associate (SAA-C03) — Question 698
A company is building a new application that uses serverless architecture. The architecture will consist of an Amazon API Gateway REST API and AWS Lambda functions to manage incoming requests.
The company wants to add a service that can send messages received from the API Gateway REST API to multiple target Lambda functions for processing. The service must offer message filtering that gives the target Lambda functions the ability to receive only the messages the functions need.
Which solution will meet these requirements with the LEAST operational overhead?
Answer options
- A. Send the requests from the API Gateway REST API to an Amazon Simple Notification Service (Amazon SNS) topic. Subscribe Amazon Simple Queue Service (Amazon SQS) queues to the SNS topic. Configure the target Lambda functions to poll the different SQS queues.
- B. Send the requests from the API Gateway REST API to Amazon EventBridge. Configure EventBridge to invoke the target Lambda functions.
- C. Send the requests from the API Gateway REST API to Amazon Managed Streaming for Apache Kafka (Amazon MSK). Configure Amazon MSK to publish the messages to the target Lambda functions.
- D. Send the requests from the API Gateway REST API to multiple Amazon Simple Queue Service (Amazon SQS) queues. Configure the target Lambda functions to poll the different SQS queues.
Correct answer: A
Explanation
Using an Amazon SNS topic with subscribed Amazon SQS queues implements a highly scalable fan-out pattern where SNS subscription filter policies ensure each queue receives only its relevant messages. This serverless architecture requires minimal operational overhead compared to managing self-hosted or managed Kafka clusters like Amazon MSK. Directing API Gateway to multiple SQS queues manually or using other custom routing mechanisms introduces unnecessary complexity and higher administrative effort.