AWS Certified Developer Associate DVA-C02 Practice Question

A developer needs to programmatically publish a single data point for a custom metric to Amazon CloudWatch from an AWS Lambda function. The metric, named 'ImagesProcessed', will be in a custom namespace. What is the most direct method to publish this metric from within the Lambda function's code?

  • Write the metric as a structured JSON log message to standard output so that a CloudWatch Logs metric filter can extract it.

  • Store the metric count in an Amazon DynamoDB table and then have CloudWatch read the metric from the table.

  • Send the metric data to an Amazon SQS queue for a separate monitoring service to process and forward to CloudWatch.

  • Call the putMetricData operation using the CloudWatch client, providing the metric namespace, name, and value.

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