A company has a data ingestion workflow that consists of the following:
? An Amazon Simple Notification Service (Amazon SNS) topic for notifications about new data deliveries
? An AWS Lambda function to process the data and record metadata
The company observes that the ingestion workflow fails occasionally because of network connectivity issues. When such a failure occurs, the Lambda function does not ingest the corresponding data unless the company manually reruns the job. Which combination of actions should a solutions architect take to ensure that the Lambda function ingests all data in the future? (Choose two.)
A. Deploy the Lambda function in multiple Availability Zones.
B. Create an Amazon Simple Queue Service (Amazon SQS) queue, and subscribe it to the SNS topic.
C. Increase the CPU and memory that are allocated to the Lambda function.
D. Increase provisioned throughput for the Lambda function.
E. Modify the Lambda function to read from an Amazon Simple Queue Service (Amazon SQS) queue.
BE
技巧:排除明顯錯誤選項,在沒有明顯錯誤的選項中選擇最合理的選項。
某公司的數據接收工作流程包括以下內容:
?亞馬遜簡單通知服務(Amazon SNS)主題,用于通知新數據交付
?AWS Lambda 函數,用于處理數據和記錄元數據
該公司觀察到,由于網絡連接問題,攝入工作流程偶爾會失敗。當發生此類故障時,Lambda 函數不會攝取相應的數據,除非公司手動重新運行作業。解決方案架構師應該采取哪些行動組合來確保 Lambda 函數在未來接收所有數據?(選擇兩個。)
A. 不正確。在多個可用區中部署 Lambda 函數。Lambda 函數本身是按需運行的,并不直接部署在特定的可用區中。Lambda 的執行環境是由 AWS 自動管理的。此外,網絡連接問題通常不是通過增加可用區數量來解決的。
B. 正確。創建一個 Amazon SQS 隊列,并將其訂閱到 SNS 主題。通過將 SQS 隊列訂閱到 SNS 主題,所有通過 SNS 發送的通知(包括新數據交付的通知)都會被發送到 SQS 隊列中。這提供了一個緩沖機制,即使 Lambda 函數由于網絡問題暫時無法處理消息,消息也會保留在隊列中,直到 Lambda 函數恢復并能夠處理它們。這是一個有效的解決方案,可以確保消息不會丟失,并在 Lambda 函數恢復后得到處理。
C. 不正確。增加分配給 Lambda 函數的 CPU 和內存。增加 CPU 和內存可能會提高 Lambda 函數的性能,但它并不能解決由于網絡連接問題導致的失敗。網絡連接問題與 Lambda 函數的資源分配無關。
D. 不正確。增加 Lambda 函數的預置吞吐量。Lambda 函數是按需運行的,并且不直接支持“預置吞吐量”的概念。Lambda 的并發執行限制可以通過請求增加,但這與網絡連接問題導致的失敗無關。
E. 正確。修改 Lambda 函數以從 Amazon SQS 隊列中讀取。通過修改 Lambda 函數以從 SQS 隊列中讀取消息,可以確保 Lambda 函數在恢復后能夠處理之前由于網絡問題而未能處理的消息。這種架構模式(使用 SNS-to-SQS-to-Lambda)是處理間歇性失敗和確保消息可靠傳遞的常見做法。這是一個有效的解決方案,與選項 B 結合使用,可以構建一個健壯的數據攝取工作流程。