Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Amazon SAP-C02 Exam - Topic 11 Question 39 Discussion

Posted by Lawrence on Sep 12, 2024 at 09:51 PM

A delivery company is running a serverless solution in tneAWS Cloud The solution manages user data, delivery information and past purchase details The solution consists of several microservices The central user service stores sensitive data in an Amazon DynamoDB table Several of the other microservices store a copy of parts of the sensitive data in different storage services

The company needs the ability to delete user information upon request As soon as the central user service deletes a user every other microservice must also delete its copy of the data immediately

Which solution will meet these requirements?

Suggested Answer: C

Set Up EventBridge Event Bus:

Step 1: Open the Amazon EventBridge console and create a custom event bus. This bus will be used to handle user deletion events.

Step 2: Name the event bus appropriately (e.g., user-deletion-bus).

Post Events on User Deletion:

Step 1: Modify the central user service to post an event to the custom EventBridge event bus whenever a user is deleted.

Step 2: Ensure the event includes relevant details such as the user ID and any other necessary metadata.

Create EventBridge Rules for Microservices:

Step 1: For each microservice that needs to delete user data, create a new rule in EventBridge that triggers on the user deletion event.

Step 2: Define the event pattern to match the user deletion event. This pattern should include the event details posted by the central user service.

Invoke Microservice Logic:

Step 1: Configure the EventBridge rule to invoke a target, such as an AWS Lambda function, which contains the logic to delete the user data from the microservice's data store.

Step 2: Each microservice should have its Lambda function or equivalent logic to handle the deletion of user data upon receiving the event.

Using Amazon EventBridge ensures a scalable, reliable, and decoupled approach to handle the deletion of user data across multiple microservices. This setup allows each microservice to independently process user deletion events without direct dependencies on other services.

Reference

AWS EventBridge Documentation

DynamoDB Streams and AWS Lambda Triggers

Implementing the Transactional Outbox Pattern with EventBridge Pipes (AWS Documentation) (Amazon Web Services, Inc.) (Amazon Web Services, Inc.) (AWS Documentation) (AWS Cloud Community).


Get Premium SAP-C02 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
36 comments · newest first
VE
Veda 11 months ago
Wait, can all microservices really delete data that fast? Sounds risky!
ST
Stephania 11 months ago
D? Really? That doesn't seem efficient at all.
TA
Tasia 11 months ago
C seems a bit overcomplicated for this task.
KA
Kathryn 11 months ago
I think B is better, SNS is more straightforward.
NO
Noemi 12 months ago
Option A sounds solid with DynamoDB Streams!
JO
Joseph 12 months ago
I’m leaning towards the SQS solution, but I’m not clear on how the event filtering would work for each microservice.
CA
Carla 1 year ago
I practiced a similar question where EventBridge was used for event-driven architectures. It seems like a solid option for this scenario.
RO
Ronny 1 year ago
I think using SNS for event notifications could work, but I’m a bit confused about how the subscriptions would handle multiple microservices.
JO
Johnathon 1 year ago
I remember studying about DynamoDB Streams, but I'm not entirely sure if they can trigger immediate deletions in all microservices.
NO
Norah 1 year ago
I'm leaning towards option B with SNS. That seems like a simple way to notify all the microservices about the user deletion, and they can each react to the event.
DE
Devorah 1 year ago
Based on the requirements, I think option C using EventBridge is the way to go. It allows the central user service to publish the deletion event, and each microservice can subscribe to that event to take the appropriate action.
DE
Derrick 1 year ago
Hmm, I'm a bit confused about the different AWS services mentioned here. I'll need to review my notes on DynamoDB, SNS, EventBridge, and SQS to figure out which one would be the best fit.
MA
Margo 1 year ago
This seems like a pretty straightforward question. I think the key is to find a way to propagate the user deletion event from the central user service to all the other microservices.
HE
Hester 1 year ago
Hmm, I'm not sure about this one. The question mentions different systems, so I'm wondering if an AppExchange package would be enough. Maybe I should consider the Apex and MuleSoft options as well.
CH
Christiane 1 year ago
I remember practicing with examples where avoiding was emphasized, but I'm a bit unclear on the reasoning behind that.
AB
Abel 2 years ago
I'm with Amber on this one - the DynamoDB Streams approach (A) seems the most bulletproof for this use case.
EL
Eleonore 2 years ago
Haha, option D with the SQS queue? Sounds like a recipe for some epic race conditions and eventual consistency issues!
IS
Isabella 2 years ago
I'd go with option B and use DynamoDB event notifications and Amazon SNS. Seems simpler than the Lambda function in option A.
LE
Leoma 2 years ago
↳ replying to Isabella
Definitely, it ensures that all copies of the sensitive data are deleted immediately when a user request is made.
AR
Arleen 2 years ago
↳ replying to Isabella
Yeah, having each microservice subscribe to the SNS topic for user deletion events makes sense.
DY
Dyan 2 years ago
↳ replying to Isabella
I agree, it does seem simpler than setting up a Lambda trigger like in option A.
AR
Ariel 2 years ago
↳ replying to Isabella
Yeah, option B definitely seems like the most efficient solution for deleting user information across all microservices.
FI
Fidelia 2 years ago
↳ replying to Isabella
Option B sounds like a good choice. Using DynamoDB event notifications and Amazon SNS seems efficient.
MO
Mozell 2 years ago
↳ replying to Isabella
I agree, option B seems straightforward and effective for ensuring all microservices delete user data immediately.
GL
Glen 2 years ago
↳ replying to Isabella
Option B sounds like the best choice. Using DynamoDB event notifications and Amazon SNS seems efficient.
TA
Tasia 2 years ago
I see your point, Nan. Option C does seem like a more efficient solution for deleting user data across all microservices.
EZ
Ezekiel 2 years ago
Option C with EventBridge looks interesting, but I'm not sure if it provides the same level of guarantee as the DynamoDB Streams approach.
RH
Rhea 2 years ago
↳ replying to Ezekiel
Let's go with Option A then, to make sure all microservices delete user data immediately.
CA
Carman 2 years ago
↳ replying to Ezekiel
I agree, Option A seems like a safer bet for ensuring immediate data deletion.
AL
Aleshia 2 years ago
↳ replying to Ezekiel
I think Option A with DynamoDB Streams might provide a more reliable solution.
CA
Carlee 2 years ago
↳ replying to Ezekiel
Option C with EventBridge is a good choice for this scenario.
NA
Nan 2 years ago
I disagree, I believe option C is better as it uses Amazon EventBridge to invoke logic in each microservice.
JO
Johnna 2 years ago
I think option A could work because it uses DynamoDB Streams to trigger events for user deletion.
AM
Amber 2 years ago
The DynamoDB Streams and Lambda solution (A) seems like the most robust and reliable way to ensure immediate data deletion across all microservices.
SE
Selene 2 years ago
↳ replying to Amber
Yes, option A provides a seamless way to ensure all microservices delete user data simultaneously.
NA
Natalie 2 years ago
↳ replying to Amber
I agree, option A with DynamoDB Streams and Lambda seems like the best choice for immediate data deletion.
0/2000 characters

Save Cancel