DVA-C02 Exam QuestionsBrowse all questions from this exam

DVA-C02 Exam - Question 13


A company receives food orders from multiple partners. The company has a microservices application that uses Amazon API Gateway APIs with AWS Lambda integration. Each partner sends orders by calling a customized API that is exposed through API Gateway. The API call invokes a shared Lambda function to process the orders.

Partners need to be notified after the Lambda function processes the orders. Each partner must receive updates for only the partner's own orders. The company wants to add new partners in the future with the fewest code changes possible.

Which solution will meet these requirements in the MOST scalable way?

Show Answer
Correct Answer: C

To achieve the most scalable solution with minimal code changes when adding new partners, it is best to use one Amazon Simple Notification Service (SNS) topic and configure the Lambda function to publish messages with specific attributes to the SNS topic. Each partner can subscribe to the SNS topic with a filter policy that ensures they only receive notifications relevant to their orders. This approach enables easy integration of new partners by simply adding new subscriptions with the appropriate filter policies, without modifying existing code or creating new SNS topics. This method ensures that each partner receives updates only for their own orders and maintains a scalable architecture.

Discussion

17 comments
Sign in to comment
UntamablesOption: C
Mar 21, 2023

C https://docs.aws.amazon.com/sns/latest/dg/sns-message-filtering.html

BibayOption: C
May 6, 2023

Option C is the most scalable way to meet the requirements. This solution allows for a single SNS topic to be used for all partners, which minimizes the need for code changes when adding new partners. By publishing messages with specific attributes to the SNS topic and applying the appropriate filter policy to the topic subscriptions, partners will only receive notifications for their own orders. This approach allows for a more flexible and scalable solution, where new partners can be added to the system with minimal changes to the existing codebase. Option A and D may not be scalable when there are a large number of partners, as creating a separate SNS topic for each partner or subscribing all partners to a single topic may not be feasible. Option B may result in a large number of Lambda functions that need to be managed separately.

xdkonorek2Option: A
Dec 21, 2023

you can create up to 10.000 filter policies per AWS account 200 filter policies per topic (not subscription!) limits option C to 200 partners 100 000 topics per AWS account, limits option A to 100 000 partners A and C works but A has better scalability with ability to add 100 000 partners

drycleansing
Apr 11, 2024

the best answer

ihta_2031Option: C
Apr 1, 2023

C is the answer. To receive only a subset of the messages, a subscriber must assign a filter policy to the topic subscription.

geekdamsel
May 6, 2023

Got this question in exam. Correct answer is C.

TungNNSOption: C
Apr 3, 2023

C is the answer https://docs.aws.amazon.com/sns/latest/dg/sns-message-filtering.html

robotgeek
Apr 13, 2023

So you are allowing Customer A to subscribe to orders from Customer B? sounds like a security fiasco IMHO. Is there any way you as a publisher can limit what Customers can subscribe to which messages with only 1 topic?

grimsdevOption: C
Apr 4, 2023

C is the best answer. A would work but is less scalable as you have to create new topics for each new partner.

robotgeekOption: A
Apr 10, 2023

The subscription depends on how the subscriber subcribes to the topic. It would be unsecure to allow customers to notify to whatever they want, they would get messages from other partners. This is more like a traditional queue scenario.

Baalhammun
Feb 8, 2024

You apply message filtering on the SNS so they recieve only their messages, think C is the correct answer

RpodOption: C
Apr 20, 2023

C is the answer

rlnd2000Option: A
Jul 11, 2023

The answer is A since this question has two crucial requirements: a) ... with the fewest code changes possible. b) ...in the MOST scalable way ChatGPT initially gives an incorrect answer and then adjusts its response when requirements are asked.

rlnd2000
Jul 11, 2023

OOH another important requirement: Each partner must receive updates for only the partner's own orders, that is not achievable with option C

Jeremy11
Jul 31, 2023

This part of C seems to meet that requirement: Apply the appropriate filter policy to the topic subscriptions.

Skywalker23
Sep 24, 2023

Cannot be A. It requires change of lambda function code to send notifications to new SNS topics for new partners. Not a scalable solution.

tttamtttamOption: C
Jul 14, 2023

C seems the most efficient way. when you add more partners, you can just assign new codes for each partner. with the codes, you can send notifications to specific paters

ninomfr64Option: C
Aug 17, 2023

C. adding a new partner would only require to create a new subscription with the right filter

leonardoliverosOption: C
Nov 16, 2023

You can using a filter policy to just sent the info by partner

badsatiOption: C
Apr 8, 2024

Answer is C ... No Question

Prosen2522Option: C
May 7, 2024

Funny understand why some people want to create separate SNS for each partner. You have got the option to filter and send notifications to the appropriate partner.

65703c1Option: C
May 21, 2024

C is the correct answer.

AnandeshOption: C
Jul 16, 2024

https://docs.aws.amazon.com/sns/latest/dg/example-filter-policies.html