A company receives orders from multiple partners via API Gateway that invoke a shared Lambda function. After processing each partner's orders, the partner needs to be notified only about its own orders. The company plans to add partners over time with minimal code changes. Which approach is the most scalable?
Choose an answer
Tap an option to check your answer.
Correct answer: Use a single Amazon SNS topic. Have the Lambda function publish messages with attributes identifying the partner, subscribe all partners to the topic, and use subscription filter policies so each partner receives only their messages..
Why this is the answer
The most scalable approach is to use a single Amazon SNS topic with message filtering. The Lambda function publishes all notifications to this central topic, including an attribute (e.g., partnerId) to identify the recipient. Each partner then subscribes to this topic, configuring a subscription filter policy to receive only messages where the partnerId attribute matches their own ID. This eliminates the need to create new SNS topics or Lambda functions for each new partner, simplifying management and reducing operational overhead as the number of partners grows. Creating a separate SNS topic for every partner is less scalable due to the management overhead of numerous topics. Creating a separate Lambda function for each partner is highly inefficient and unscalable, as it multiplies code and resources. Using a single SNS topic without filtering means all partners receive all messages, which is incorrect for the requirement of partner-specific notifications.
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