
Ultimate access to all questions.
A company's mobile application, which is accessed by various users including testers, makes HTTP API calls to an Application Load Balancer (ALB). This ALB directs these calls to an AWS Lambda function. The application's version is indicated in the user-agent header sent with each API request. Following recent API modifications, the company has encountered application issues and seeks to collect metrics for each API operation by response code, specific to each application version in use. The DevOps engineer has already updated the Lambda function to capture the API operation name, version from the user-agent header, and response code. What further steps should the DevOps engineer implement to obtain these 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.