A serverless system contains a central user service (DynamoDB) that stores sensitive data. Other microservices maintain local copies of parts of that sensitive data in various storage services. When the central user service deletes a user, every other microservice must immediately delete its copy. Which design satisfies this requirement?
Choose an answer
Tap an option to check your answer.
Correct answer: When the central service deletes a user, publish a custom event to an EventBridge event bus. Create an EventBridge rule per microservice that matches the user-deletion event and invokes the microservice logic to delete the user from its datastore..
Why this is the answer
The correct answer leverages Amazon EventBridge, which is ideal for routing events between decoupled microservices. When the central service deletes a user, it publishes a custom event to EventBridge. Each microservice then has its own EventBridge rule configured to match this specific user-deletion event and trigger its corresponding logic to delete the user data. This ensures immediate, targeted, and decoupled notification to all relevant microservices. DynamoDB Streams with an SQS queue requires each microservice to poll, which introduces latency and complexity for immediate deletion. DynamoDB event notifications publishing to an SNS topic would work, but EventBridge offers more advanced filtering and routing capabilities for complex microservice architectures. Using an SQS queue directly for all microservices with event filters is less efficient for broadcasting than EventBridge or SNS, as SQS is primarily a point-to-point messaging service.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed