exam questions

Exam AWS Certified DevOps Engineer - Professional DOP-C02 All Questions

View all questions & answers for the AWS Certified DevOps Engineer - Professional DOP-C02 exam

Exam AWS Certified DevOps Engineer - Professional DOP-C02 topic 1 question 203 discussion

A company's application runs on Amazon EC2 instances. The application writes to a log file that records the username, date, time, and source IP address of the login. The log is published to a log group in Amazon CloudWatch Logs.

The company is performing a root cause analysis for an event that occurred on the previous day. The company needs to know the number of logins for a specific user from the past 7 days.

Which solution will provide this information?

  • A. Create a CloudWatch Logs metric filter on the log group. Use a filter pattern that matches the username. Publish a CloudWatch metric that sums the number of logins over the past 7 days.
  • B. Create a CloudWatch Logs subscription on the log group. Use a filter pattern that matches the username. Publish a CloudWatch metric that sums the number of logins over the past 7 days.
  • C. Create a CloudWatch Logs Insights query that uses an aggregation function to count the number of logins for the username over the past 7 days. Run the query against the log group.
  • D. Create a CloudWatch dashboard. Add a number widget that has a filter pattern that counts the number of logins for the username over the past 7 days directly from the log group.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Ramdi1
Highly Voted 1 year, 2 months ago
Selected Answer: C
C - CloudWatch Logs Insights: This service allows you to run ad-hoc queries against your log data without creating additional infrastructure like metrics or subscriptions. Aggregation function: Functions like count() can specifically calculate the number of occurrences based on specific criteria. Filtering by username and timeframe: The query can be tailored to include the specific username and filter for entries within the past 7 days.
upvoted 5 times
Ramdi1
1 year, 2 months ago
A. Metric filter: It can count occurrences, but requires additional metric creation and subscription, introducing complexity. B. Subscription: Similar to metric filter, requires creating an additional subscription and pushing data elsewhere. D. Dashboard widget: Limited in its capabilities, might not allow complex filtering and aggregation needed for this specific analysis.   Therefore, CloudWatch Logs Insights offers the most direct and flexible solution for analyzing the desired login data within the given timeframe and user criteria.
upvoted 1 times
...
...
dkp
Highly Voted 1 year ago
Selected Answer: C
answer C
upvoted 5 times
...
heff_bezos
Most Recent 7 months, 1 week ago
Selected Answer: C
There is no cloudwatch metric that logs user logins
upvoted 2 times
...
itzrahulyadav
8 months, 3 weeks ago
D For A you would have to setup the cloudwatch metric filters beforehand as you won't be able to analyze past logs without the setup
upvoted 1 times
...
mumumu
1 year ago
Selected Answer: C
The solution that will provide the number of logins for a specific user from the past 7 days is Option C: Create a CloudWatch Logs Insights query that uses an aggregation function to count the number of logins for the username over the past 7 days. Run the query against the log group.
upvoted 4 times
...
Shasha1
1 year, 1 month ago
C https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData_AggregationQuery.html
upvoted 2 times
...
fdoxxx
1 year, 2 months ago
Selected Answer: C
C is the most suitable solution for obtaining the required information
upvoted 5 times
...
kyuhuck
1 year, 2 months ago
Selected Answer: C
, C. Create a CloudWatch Logs Insights query that uses an aggregation function to count the number of logins for the username over the past 7 days. Run the query against the log group. is the best solution. This method directly addresses the need to analyze log data for a specific pattern (user logins) and aggregate the counts over a specified period, which is exactly what's needed for a root cause analysis of the event.
upvoted 5 times
...
thanhnv142
1 year, 2 months ago
Selected Answer: A
A is correct: CloudWatch Logs metric filter can filter out relevant logs and count B: irrelevant, this is for sharing logs to other sources C: This can accomplish the task. However, loudWatch Logs metric filter offers us the same function with less cost. Using CloudWatch Logs Insights query incur more costs. This feature is primarily used for data analysis D: irrelevant
upvoted 1 times
...
Chelseajcole
1 year, 2 months ago
C. It must be CloudWatch Logs Insights query
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago