SAP-C02 第 179 题
题目
A solutions architect is designing a solution to process events. The solution must have the ability to scale in and out based on the number of events that the solution receives. If a processing error occurs, the event must move into a separate queue for review. Which solution will meet these requirements?
中文翻译:
解决方案架构师正在设计处理事件的解决方案。解决方案必须能够根据解决方案接收的事件数量进行扩展和扩展。如果发生处理错误,则该事件必须移至单独的队列中以供审核。哪种解决方案可以满足这些要求?
选项
A. Send event details to an Amazon Simple Notification Service (Amazon SNS) topic. Configure an AWS Lambda function as a subscriber to the SNS topic to process the events. Add an on-failure destination to the function. Set an Amazon Simple Queue Service (Amazon SQS) queue as the target.
中文翻译:
将事件详细信息发送到 Amazon Simple Notification Service (Amazon SNS) 主题。将 AWS Lambda 函数配置为 SNS 主题的订阅者以处理事件。向该函数添加失败时目标。将 Amazon Simple Queue Service (Amazon SQS) 队列设置为目标。
B. Publish events to an Amazon Simple Queue Service (Amazon SQS) queue. Create an Amazon EC2 Auto Scaling group. Configure the Auto Scaling group to scale in and out based on the ApproximateAgeOfOldestMessage metric of the queue. Configure the application to write failed messages to a dead-letter queue.
中文翻译:
将事件发布到 Amazon Simple Queue Service (Amazon SQS) 队列。创建 Amazon EC2 Auto Scaling 组。配置 Auto Scaling 组以根据队列的 ApproximateAgeOfOldestMessage 指标进行扩展和扩展。配置应用程序以将失败的消息写入死信队列。
C. Write events to an Amazon DynamoDB table. Configure a DynamoDB stream for the table. Configure the stream to invoke an AWS Lambda function. Configure the Lambda function to process the events.
中文翻译:
将事件写入 Amazon DynamoDB 表。为表配置 DynamoDB 流。配置流以调用 AWS Lambda 函数。配置 Lambda 函数来处理事件。
D. Publish events to an Amazon EventBndge event bus. Create and run an application on an Amazon EC2 instance with an Auto Scaling group that is behind an Application Load Balancer (ALB). Set the ALB as the event bus target. Configure the event bus to retry events. Write messages to a dead-letter queue if the application cannot process the messages.
中文翻译:
将事件发布到 Amazon EventBndge 事件总线。在具有应用程序负载均衡器 (ALB) 后面的 Auto Scaling 组的 Amazon EC2 实例上创建并运行应用程序。将 ALB 设置为事件总线目标。配置事件总线以重试事件。如果应用程序无法处理消息,则将消息写入死信队列。
答案
B
解析
正确答案:B 解析: 本题应选择 B。 正确选项: B. 将事件发布到 Amazon Simple Queue Service (Amazon SQS) 队列。创建 Amazon EC2 Auto Scaling 组。配置 Auto Scaling 组以根据队列的 ApproximateAgeOfOldestMessage 指标进行扩展和扩展。配置应用程序以将失败的消息写入死信队列。 选择理由: 该选项最直接地满足题干中的关键约束。做 ...