AWS Certified Developer Associate DVA-C02 Practice Question

A developer has written a Lambda function to process incoming user profile updates and wants to track the number of failed update attempts due to validation errors. They need to create a custom metric for this purpose and report it using Amazon CloudWatch. Which approach should the developer use to implement this requirement?

  • Create a new CloudWatch Logs log stream and write an error message with a specific format for every failed validation attempt.

  • Implement AWS X-Ray tracing in the Lambda function and filter the trace data to count the validation errors.

  • Emit logs in the CloudWatch embedded metric format (EMF) from the Lambda function for every failed validation attempt.

  • Use the AWS SDK in the Lambda function to put a custom metric by calling the CloudWatch PutMetricData API when a validation error occurs.

AWS Certified Developer Associate DVA-C02
Troubleshooting and Optimization
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot