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 1 discussion

A company has a mobile application that makes HTTP API calls to an Application Load Balancer (ALB). The ALB routes requests to an AWS Lambda function. Many different versions of the application are in use at any given time, including versions that are in testing by a subset of users. The version of the application is defined in the user-agent header that is sent with all requests to the API.
After a series of recent changes to the API, the company has observed issues with the application. The company needs to gather a metric for each API operation by response code for each version of the application that is in use. A DevOps engineer has modified the Lambda function to extract the API operation name, version information from the user-agent header and response code.
Which additional set of actions should the DevOps engineer take to gather the required metrics?

  • A. Modify the Lambda function to write the API operation name, response code, and version number as a log line to an Amazon CloudWatch Logs log group. Configure a CloudWatch Logs metric filter that increments a metric for each API operation name. Specify response code and application version as dimensions for the metric.
  • B. Modify the Lambda function to write the API operation name, response code, and version number as a log line to an Amazon CloudWatch Logs log group. Configure a CloudWatch Logs Insights query to populate CloudWatch metrics from the log lines. Specify response code and application version as dimensions for the metric.
  • C. Configure the ALB access logs to write to an Amazon CloudWatch Logs log group. Modify the Lambda function to respond to the ALB with the API operation name, response code, and version number as response metadata. Configure a CloudWatch Logs metric filter that increments a metric for each API operation name. Specify response code and application version as dimensions for the metric.
  • D. Configure AWS X-Ray integration on the Lambda function. Modify the Lambda function to create an X-Ray subsegment with the API operation name, response code, and version number. Configure X-Ray insights to extract an aggregated metric for each API operation name and to publish the metric to Amazon CloudWatch. Specify response code and application version as dimensions for the metric.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
BaburTurk
Highly Voted 1 year, 3 months ago
Selected Answer: A
Option A: This option is the most efficient way to gather the required metrics. It does not require any additional infrastructure and can be easily implemented. Option B: This option is more complex than Option A and requires configuring a CloudWatch Logs Insights query. This can be more time-consuming to set up and can be less efficient if the query is not optimized. Option C: This option requires configuring the ALB access logs to write to CloudWatch Logs. This can add additional latency to the requests. Option D: This option requires configuring AWS X-Ray integration. This is a more complex solution that is not necessary in this case.
upvoted 5 times
...
maikerusukofyirudo
Most Recent 4 weeks, 1 day ago
Selected Answer: A
That’s right
upvoted 1 times
...
chan123
1 month ago
Selected Answer: D
dsfdsf
upvoted 1 times
...
c3518fc
3 months ago
Selected Answer: A
The other options are either incomplete or involve unnecessary complexity: Option B requires using CloudWatch Logs Insights queries, which may introduce additional complexity and potential performance overhead. Option C involves modifying the ALB access logs, which may not provide the required level of granularity or flexibility for capturing the application version information. Option D requires integrating AWS X-Ray, which is primarily designed for distributed tracing and may not be necessary for this specific use case of gathering metrics by response code and application version. Therefore, option A is the most appropriate and straightforward solution for the given requirements.
upvoted 4 times
...
nothinmuch
10 months ago
Selected Answer: B
The answer is b based on the scenario. When to Choose Which Choose A (Metric Filters) if you need basic metrics with straightforward patterns (e.g., counting occurrences of specific API operations and response codes). Choose B (Insights Queries) if you require more complex metric calculations, such as: Aggregations (averages, sums, etc.) over time Filtering metrics based on conditions within the logs Creating custom metrics not directly defined in log lines
upvoted 1 times
...
Gowtham5798
11 months ago
The correct answer is A.
upvoted 1 times
...
thanhnv142
11 months ago
A is correct: Because only need to gather metric but not parse log or advanced analyzing the log.
upvoted 1 times
...
thanhnv142
11 months ago
A definitely
upvoted 1 times
...
hoakhanh281
12 months ago
Cloudwatch log metrics filter can apply on pattern and populate metrics, CW insight significant to get it. B should be correct one
upvoted 1 times
...
d262e67
1 year ago
Selected Answer: A
CloudWatch Logs Insights is a powerful tool for analyzing log data, but it's more suited for ad-hoc exploration and troubleshooting rather than continuous metric collection and monitoring.
upvoted 3 times
...
DucSiu
1 year ago
The company needs to gather a metric for each API operation by response code for each version of the application that is in use => A
upvoted 1 times
...
wem
1 year, 1 month ago
Option A seems to be the most straightforward and effective method. By writing the required information as a log line to CloudWatch Logs and configuring a metric filter to increment metrics based on this data, the company can efficiently gather the metrics it needs with minimal complexity. This approach leverages existing AWS services in a simple and direct manner, aligning well with the company's requirements.
upvoted 3 times
...
DevopsCircus
1 year, 1 month ago
Answer A looks pretty good except one thing "Configure a CloudWatch Logs metric filter that increments a metric for each API operation name." Can the metric filter "increment" the metric or just send metric value? Answer B looks weird to me - I don't know the way to populate Logs Insights query result as the CW metric
upvoted 1 times
...
zain1258
1 year, 2 months ago
Selected Answer: A
The right option is A. In the question, the requirement is to get a metric. In option B, we are not creating any metric.
upvoted 1 times
...
sivre
1 year, 2 months ago
For me its B. From the question "The company needs to gather a metric for each API operation by response code for each version of the application that is in use". Only CloudWatch Logs Insight is querying for response code and application version. CloudWatch Logs metric filter is using API operation name to create an aggregate metric
upvoted 1 times
...
rbm2023
1 year, 2 months ago
Selected Answer: A
It should be between A and B but the thing is the difference use cases between CW Logs Metric and CW Logs Insights. Metrics will provide Aggregated data while insights give you direct access to raw log event data. Hence I would go for A
upvoted 2 times
...
Aestebance
1 year, 3 months ago
Selected Answer: A
More efficient
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