exam questions

Exam AWS DevOps Engineer Professional All Questions

View all questions & answers for the AWS DevOps Engineer Professional exam

Exam AWS DevOps Engineer Professional topic 1 question 119 discussion

Exam question from Amazon's AWS DevOps Engineer Professional
Question #: 119
Topic #: 1
[All AWS DevOps Engineer Professional Questions]

A mobile application running on eight Amazon EC2 instances is relying on a third-party API endpoint. The third-party service has a high failure rate because of limited capacity which is expected to be resolved in a few weeks.

In the meantime, the mobile application developers have added a retry mechanism and are logging failed API requests. A DevOps engineer must automate the monitoring of application logs and count the specific error messages, if there are more than 10 errors within a 1-minute window the system must issue an alert.

How can the requirements be met with MINIMAL management overhead?

  • A. Install the Amazon CloudWatch agent on all instances to push the application logs to CloudWatch Logs. Use metric filters to count the error messages every minute, and initiate a CloudWatch alarm if the count exceeds 10 errors.
  • B. Install the Amazon CloudWatch agent on all instances to push the access logs to CloudWatch Logs. Create an Amazon EventBridge (Amazon CloudWatch Events) rule to count the error messages every minute, and initiate a CloudWatch alarm if the count exceeds 10 errors.
  • C. Install the Amazon CloudWatch agent on all instances to push the application logs to CloudWatch Logs. Use a metric filter to generate a custom CloudWatch metric that records the number of failures and initiates a CloudWatch alarm if the custom metric reaches 10 errors in a 1-minute period.
  • D. Deploy a custom script on all instances to check application logs regularly in a cron job. Count the number of error messages every minute, and push a data point to a custom CloudWatch metric. Initiate a CloudWatch alarm if the custom metric reaches 10 errors in a 1-minute period.
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
saggy4
Highly Voted 2 years, 4 months ago
Selected Answer: C
C -- We need to use CloudWatch metric filter to generate count and Cloudwatch alarm for checking number of counts in a minute. A -- is wrong as you can only use metric filters to get count per occurrence in logs and not count in a particular time frame.
upvoted 8 times
...
ParagSanyashiv
Most Recent 2 years ago
Selected Answer: A
A is more promising in this scenario.
upvoted 1 times
vn_thanhtung
1 year ago
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/MonitoringLogData.html check this link how to create metric filters to count the error messages every minute. C is correct answer
upvoted 1 times
...
...
merki
2 years ago
Selected Answer: A
The solution that meets the requirements with MINIMAL management overhead is option A. Here's why: Option A suggests installing the Amazon CloudWatch agent on all instances to push the application logs to CloudWatch Logs. Then, using metric filters to count the error messages every minute, and initiating a CloudWatch alarm if the count exceeds 10 errors. This approach is the most straightforward and requires the least amount of custom coding or scripts. It uses Amazon CloudWatch and its built-in capabilities for monitoring and alerting on logs.
upvoted 1 times
...
easytoo
2 years, 1 month ago
It's C, and here's why... CloudWatch agent - easy to install and configure, and requires minimal management overhead. Metric filter to count the specific error messages - a lightweight and efficient way to monitor logs and generate metrics. Generates a custom CloudWatch metric - can be used to track the specific error messages over time and trigger alarms if the count exceeds a certain threshold. Also meets the requirement of issuing an alert if there are more than 10 errors within a 1-minute window.
upvoted 1 times
...
asfsdfsdf
2 years, 2 months ago
For me C is the correct one. Why not A? how can a metric filter trigger a cloudwatch alarm? you must use the custom metric created by it in order to trigger the alarm - this cannot be done directly based on a filter.
upvoted 2 times
AkaAka4
2 years, 1 month ago
The metric filter is there to count the number of error messages per minute, and THEN we set up CloudWatch alarm with the metric. Maybe I'm wrong, but your rationale might be actually invalid.
upvoted 1 times
...
...
SHoKMaSTeR
2 years, 2 months ago
Selected Answer: A
A vs C --> A "if there are more than 10 errors within a 1-minute" C is checking 10 per minute
upvoted 3 times
AkaAka4
2 years, 1 month ago
Ohhhh you're right...!
upvoted 1 times
...
...
BelloMio
2 years, 2 months ago
Definitely A. You can use metric filter to count the error, create an alarm for it within a 1 minute period that can check if threshold for the metric (count in this case) is above 10. Just go and test it
upvoted 2 times
BelloMio
2 years, 2 months ago
Most definitely not C, how can you generate a custom metric from a metric filter?!
upvoted 1 times
...
...
Piccaso
2 years, 3 months ago
Selected Answer: C
D is eliminated in the first round because of "cron job". B is pushing only "access logs" A looks all errors, not a specific type of errors.
upvoted 1 times
...
DerekKey
2 years, 3 months ago
Selected Answer: C
B & D - wrong A - wrong - metric filter is only providing custom metrics, it is not doing any calculations ("Use metric filters to count the error messages every minute") C - correct - metrics filter provides a new custom metric used by CW alarm to trigger an action
upvoted 1 times
...
Bulti
2 years, 3 months ago
A is the right answer. You can generate a custom metric from a metric filter. You can generate only a standard metric from the CloudWatch metric filter. Custom metric can be generated only via CLI.
upvoted 2 times
...
Dimidrol
2 years, 3 months ago
Selected Answer: C
C is answer, you could test this solution from aws console. When you create metrics filter it will create new metric for you
upvoted 2 times
...
bartekb3d
2 years, 4 months ago
Selected Answer: C
correct answer C
upvoted 1 times
...
bartekb3d
2 years, 4 months ago
Selected Answer: A
there is no need to create custom metric
upvoted 1 times
...
obaf1
2 years, 4 months ago
Selected Answer: A
Ans:A C is wrong because to create a "custom CloudWatch metric", you need to write your own script or use an application monitoring script. See AWS docs below: https://docs.aws.amazon.com/managedservices/latest/userguide/custom-cloudwatch-events.html
upvoted 1 times
...
ericzaj
2 years, 4 months ago
Selected Answer: C
Going with C. C states use of custom metric filter.
upvoted 1 times
...
obaf1
2 years, 4 months ago
Selected Answer: A
Ans: A For those choosing C, please, read AWS documentation about "custom CloudWatch metrics". You don't use metric filter to generate "custom CloudWatch metric", instead you use the AWS CLI or an API (see excerpt below): Full link: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html "Publishing custom metrics ------------------------------------------- You can publish your own metrics to CloudWatch using the AWS CLI or an API. You can view statistical graphs of your published metrics with the AWS Management Console."
upvoted 1 times
...
obaf1
2 years, 4 months ago
Ans is A User Saggy4 is wrong in stating that "A is wrong as you can only use metric filters to get count per occurrence in logs and not count in a particular time frame." Scroll to 2:08 of the tutorial below: https://www.youtube.com/watch?v=I_VjSvSSoF4&ab_channel=SREMasterClass (You can specify the time period within which the error count needs to occur by creating an alarm on top of your metric. Please, see the video above eg 10 errors within a minute)
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