
Answer-first summary for fast verification
Answer: Configure the central user service to post an event on a custom Amazon EventBridge event bus when the company deletes a user. Create an EventBridge rule for each microservice to match the user deletion event pattern and invoke logic in the microservice to delete the user from the DynamoDB table.
The correct answer is C. 1. **Explanation for the answer C:** Answer C suggests configuring the central user service to post an event on a custom Amazon EventBridge event bus when the company deletes a user. EventBridge is a serverless event bus that makes it easy to connect application components using data from a variety of sources. When the user deletion event occurs, an EventBridge rule can be configured for each microservice to match this specific event pattern. This allows each microservice to be notified immediately and perform the necessary actions to delete the user data from its respective storage. Using EventBridge in this scenario is advantageous because: - **Real-time event-driven architecture**: It ensures that the events are processed in real-time, allowing other microservices to handle the user deletion promptly. - **Decoupling**: It decouples the central user service from the other microservices, allowing independent scaling and management of each service. - **Flexibility in event handling**: Different microservices can have customized logic to process the user deletion event, and this setup can easily be extended to include more services or actions if needed. - **Reliability and scalability**: EventBridge is a managed service that automatically scales with your event traffic and provides high availability and reliability. Therefore, answer C is the most appropriate solution for ensuring that once the central user service deletes a user, every other microservice also deletes its copy of the data immediately.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A delivery company is running a serverless solution in the AWS 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?
A
Activate DynamoDB Streams on the DynamoDB table. Create an AWS Lambda trigger for the DynamoDB stream that will post events about user deletion in an Amazon Simple Queue Service (Amazon SQS) queue. Configure each microservice to poll the queue and delete the user from the DynamoDB table.
B
Set up DynamoDB event notifications on the DynamoDB table. Create an Amazon Simple Notification Service (Amazon SNS) topic as a target for the DynamoDB event notification. Configure each microservice to subscribe to the SNS topic and to delete the user from the DynamoDB table.
C
Configure the central user service to post an event on a custom Amazon EventBridge event bus when the company deletes a user. Create an EventBridge rule for each microservice to match the user deletion event pattern and invoke logic in the microservice to delete the user from the DynamoDB table.
D
Configure the central user service to post a message on an Amazon Simple Queue Service (Amazon SQS) queue when the company deletes a user. Configure each microservice to create an event filter on the SQS queue and to delete the user from the DynamoDB table.