SAP-C02 第 166 题
题目
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?
中文翻译:
一家送货公司正在 AWS 云中运行无服务器解决方案。该解决方案管理用户数据、送货信息和过去的购买详细信息。该解决方案由多个微服务组成。中央用户服务将敏感数据存储在 Amazon DynamoDB 表中。其他几个微服务将部分敏感数据的副本存储在不同的存储服务中。公司需要能够根据请求删除用户信息。一旦中央用户服务删除用户,其他所有微服务也必须立即删除其数据副本。哪种解决方案可以满足这些要求?
选项
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.
中文翻译:
在 DynamoDB 表上激活 DynamoDB Streams。为 DynamoDB 流创建一个 AWS Lambda 触发器,该触发器将在 Amazon Simple Queue Service (Amazon SQS) 队列中发布有关用户删除的事件。配置每个微服务以轮询队列并从 DynamoDB 表中删除用户。
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.
中文翻译:
在 DynamoDB 表上设置 DynamoDB 事件通知。创建 Amazon Simple Notification Service (Amazon SNS) 主题作为 DynamoDB 事件通知的目标。配置每个微服务以订阅 SNS 主题并从 DynamoDB 表中删除用户。
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.
中文翻译:
配置中央用户服务,以便在公司删除用户时在自定义 Amazon EventBridge 事件总线上发布事件。为每个微服务创建一个 EventBridge 规则,以匹配用户删除事件模式,并调用微服务中的逻辑以从 DynamoDB 表中删除用户。
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.
中文翻译:
配置中央用户服务,以便在公司删除用户时在 Amazon Simple Queue Service (Amazon SQS) 队列上发布消息。配置每个微服务以在 SQS 队列上创建事件筛选器并从 DynamoDB 表中删除用户。
答案
C
解析
正确答案:C 解析: 本题应选择 C。 正确选项: C. 配置中央用户服务,以便在公司删除用户时在自定义 Amazon EventBridge 事件总线上发布事件。为每个微服务创建一个 EventBridge 规则,以匹配用户删除事件模式,并调用微服务中的逻辑以从 DynamoDB 表中删除用户。 选择理由: 该选项最直接地满足题干中的关键约束。做 SAP-C02 题目时,需要同时对照题干里的限定词,例如最高性能、最低运维开销、成本效益...