Q48 — AWS DVA-C02 Ch.3

Question 48 of 100 | ← Chapter 3

A company receives food orders from multiple partners. It operates a microservices application using Amazon API Gateway APIs integrated with AWS Lambda. Each partner invokes a custom API exposed by API Gateway to submit orders. API invocations trigger a shared Lambda function to process orders. After processing, partners must receive notifications. Each partner must receive updates only for their own orders. The company wants to minimize code changes when adding new partners in the future. Which solution meets these requirements in the most scalable way?

Correct Answer: C. Create a single Amazon Simple Notification Service (Amazon SNS) topic. Configure the Lambda function to publish messages with specific attributes identifying the partner. Subscribe each partner to the SNS topic and apply appropriate subscription filter policies.

Explanation

Option C is the most scalable: a single SNS topic with message attributes and subscription-level filtering allows new partners to be added simply by creating a new subscription with a filter policy — no code changes to the Lambda function or infrastructure reconfiguration. Option A creates operational overhead managing many topics. Option B violates separation of concerns and increases maintenance burden with each new partner. Option D lacks filtering, causing all partners to receive all messages — violating isolation and scalability. Thus, C is optimal.