AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 15
A company has migrated its container-based applications to Amazon EKS and want to establish automated email notifications. The notifications sent to each email address are for specific activities related to EKS components. The solution will include Amazon SNS topics and an AWS Lambda function to evaluate incoming log events and publish messages to the correct SNS topic.
Which logging solution will support these requirements?
Answer options
- A. Enable Amazon CloudWatch Logs to log the EKS components. Create a CloudWatch subscription filter for each component with Lambda as the subscription feed destination.
- B. Enable Amazon CloudWatch Logs to log the EKS components. Create CloudWatch Logs Insights queries linked to Amazon EventBridge events that invoke Lambda.
- C. Enable Amazon S3 logging for the EKS components. Configure an Amazon CloudWatch subscription filter for each component with Lambda as the subscription feed destination.
- D. Enable Amazon S3 logging for the EKS components. Configure S3 PUT Object event notifications with AWS Lambda as the destination.
Correct answer: A
Explanation
The correct answer is A because enabling Amazon CloudWatch Logs for EKS components allows the collection of logs, and creating a subscription filter with Lambda lets specific log events trigger the function to send notifications. Option B does not directly provide a mechanism for real-time notifications based on log events. Options C and D rely on S3 logging, which is not suited for the real-time logging needs of EKS components.