CompTIA Study Materials
AWS Study Materials
AWS Certified Developer Associate AWS Certified Developer Associate
AWS Certified Developer Associate DVA-C02
AWS Certified Solutions Architect Associate AWS Certified Solutions Architect Associate
AWS Certified Solutions Architect Associate SAA-C03
AWS Cloud Practitioner AWS Cloud Practitioner
AWS Cloud Practitioner CLF-C02
Microsoft Study Materials
Microsoft Azure Fundamentals Microsoft Azure Fundamentals
Microsoft Azure Fundamentals AZ-900

Free 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.

This question's topic:
AWS Certified Developer Associate DVA-C02 / 
Troubleshooting and Optimization
Your Score:
Troubleshooting and Optimization
Development with AWS Services
Security
Deployment