Exam DVA-C02 All QuestionsBrowse all questions from this 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?

    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
UntamablesOption: C

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

BibayOption: C

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

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

the best answer

geekdamsel

Got this question in exam. Correct answer is C.

ihta_2031Option: C

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

TungNNSOption: C

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

robotgeek

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?

RpodOption: C

C is the answer

robotgeekOption: A

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

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

grimsdevOption: C

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

AnandeshOption: C

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

65703c1Option: C

C is the correct answer.

Prosen2522Option: C

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.

badsatiOption: C

Answer is C ... No Question

leonardoliverosOption: C

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

ninomfr64Option: C

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

tttamtttamOption: C

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

rlnd2000Option: A

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

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

Jeremy11

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

Skywalker23

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