Q46 — AWS SAA-C03 第2章

第 46/65 题 | ← 返回第2章

Q111.一家公司有一个数据摄取工作流,包括以下组件:-- 一个 Amazon Simple Notification Service (Amazon SNS) 主题,用于接收有关新数据传输的通知.-- 处理和存储数据的 AWS Lambda 函数.由于网络连接问题,摄取工作流有时会失败.当发生故障时,除非公司手动重新运行作业,否则不会摄取相应的数据.解决方案架构师应该怎么做才能确保最终处理所有通知?

正确答案: D. 将 Amazon Simple Queue Service (Amazon SQS) 队列配置为发生故障时的目的地.修改 Lambda 函数以处理队列中的消息

解析

To ensure that all notifications are ultimately processed, the solution architect can configure the Amazon SQS queue as the failure target of the Lambda function. In this way, when the execution of the Lambda function fails, a retried notification is sent to the SQS queue. These notifications of failure can then be polled or triggered in another Lambda function to ensure that the data can be passed successfully. Therefore, in this case, answers A and B do not relate to how to handle notifications of failures. Answer C While you can increase the number of retries, there is no guarantee that all notifications will be successfully processed. Therefore, the best answer is D. 要确保所有通知最终都被处理,解决方案架构师可以将 Amazon SQS 队列配置为Lambda函数的失败目标。这样,当Lambda函数执行失败时,会将可重试的通知发送到SQS队列中。然后,可以在另一个Lambda函数中轮询或触发器来处理这些失败的通知,以确保数据可以成功传递。 因此,在此情况下,答案A和B不涉及如何处理失败的通知。答案C虽然可以增加重试次数,但不能保证所有通知都将被成功处理。因此,最佳答案是D。