Which solution will meet these requirements in the MOST scalable way?
Create a different Amazon Simple Notification Service (Amazon SNS) topic for each partner. Configure the Lambda function to publish messages for each partner to the partner’s SNS topic.
Create a different Lambda function for each partner. Configure the Lambda function to notify each partner’s service endpoint directly.
Create an Amazon Simple Notification Service (Amazon SNS) topic. Configure the Lambda function to publish messages with specific attributes to the SNS topic. Subscribe each partner to the SNS topic. Apply the appropriate filter policy to the topic subscriptions.
Create one Amazon Simple Notification Service (Amazon SNS) topic. Subscribe all partners to the SNS topic.
Explanations:
Creating a separate SNS topic for each partner would not be scalable as the number of partners increases. It requires significant code changes and management overhead whenever a new partner is added.
Creating a different Lambda function for each partner is not scalable and leads to code duplication. It complicates deployment and maintenance as each function would need to be managed individually, increasing operational complexity.
Using a single SNS topic with message attributes allows for efficient filtering. Partners can subscribe to the topic and receive messages related to their specific orders only, ensuring scalability and ease of adding new partners with minimal changes.
While this option allows for a single SNS topic, it does not provide the necessary filtering mechanism. All partners would receive all notifications, which does not meet the requirement of ensuring that partners only receive updates for their own orders.