
Answer-first summary for fast verification
Answer: Use the Amazon CloudWatch agent to send logs from the EC2 instances to Amazon CloudWatch Logs. Configure AWS CloudTrail to deliver the API logs to CloudWatch Logs. Use CloudWatch Logs Insights to query both sets of logs.
Option B is the correct answer. It provides a comprehensive solution for querying both application logs and AWS account API activity logs. The Amazon CloudWatch agent is used to send logs from EC2 instances to Amazon CloudWatch Logs. AWS CloudTrail is configured to deliver API logs to CloudWatch Logs. This allows the use of CloudWatch Logs Insights to efficiently query and analyze both sets of logs. This approach ensures that all logs are centralized within CloudWatch Logs, providing a seamless querying experience through CloudWatch Logs Insights, which is specifically designed for this purpose.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A company is deploying a new application using Amazon EC2 instances and requires a solution to efficiently query both application logs and AWS account API activity logs. Which of the following solutions would effectively meet these requirements?
A
Use the Amazon CloudWatch agent to send logs from the EC2 instances to Amazon CloudWatch Logs. Configure AWS CloudTrail to deliver the API logs to Amazon S3. Use CloudWatch to query both sets of logs.
B
Use the Amazon CloudWatch agent to send logs from the EC2 instances to Amazon CloudWatch Logs. Configure AWS CloudTrail to deliver the API logs to CloudWatch Logs. Use CloudWatch Logs Insights to query both sets of logs.
C
Use the Amazon CloudWatch agent to send logs from the EC2 instances to Amazon Kinesis. Configure AWS CloudTrail to deliver the API logs to Kinesis. Use Kinesis to load the data into Amazon Redshift. Use Amazon Redshift to query both sets of logs.
D
Use the Amazon CloudWatch agent to send logs from the EC2 instances to Amazon S3. Use AWS CloudTrail to deliver the API logs to Amazon S3. Use Amazon Athena to query both sets of logs in Amazon S3.
No comments yet.