DVA-C02 domain - 18% of the exam

Troubleshooting and Optimization

Troubleshooting and Optimization is 18% of the AWS Certified Developer - Associate (DVA-C02) exam. These are the objectives it covers, each with practice questions and worked explanations.

Objectives in this domain

Sample question from this domain

Free sampleTroubleshooting and Optimizationhard

A team wants a Lambda function to emit custom metrics through the CloudWatch embedded metric format (EMF) so a single structured log line is parsed into metrics with no separate metrics API call. Which TWO elements must the log object contain for CloudWatch to extract the metrics correctly? (Select TWO.)

  • AAn _aws node holding a CloudWatchMetrics array that names the namespace, the dimension sets and the metric directives. Correct
  • BTop-level properties whose keys match the metric and dimension names referenced in the metric directives. Correct
  • CA call to PutMetricData inside the handler that publishes the same values synchronously to CloudWatch.
  • DA StorageResolution property set to 1 so that the metrics are stored at standard one-minute granularity.
  • EA CloudWatch metric filter defined on the log group to scan the lines and create the metrics.
EMF needs both the _aws CloudWatchMetrics metadata directives and matching top-level value properties in the same JSON log line for CloudWatch to extract metrics. CloudWatch parses an EMF log line by reading the _aws.CloudWatchMetrics directives to learn the namespace, dimensions and metric names, then pulls the corresponding numeric and dimension values from top-level keys of the same object. Both halves must be present and consistent, with no PutMetricData call or metric filter involved.

Why A is correct: The _aws metadata node with the CloudWatchMetrics array is what tells CloudWatch which properties are metrics, under which namespace and dimensions, so it is required.

Why B is correct: EMF reads the actual numeric values and dimension values from top-level members of the same JSON object, so those keys must be present and match the directives.

Why C is wrong: EMF exists precisely to avoid a synchronous PutMetricData call; adding one defeats the purpose and is not part of the log object.

Why D is wrong: StorageResolution of 1 means high resolution, not standard, and it is optional metadata, not a requirement for EMF extraction to work.

Why E is wrong: Metric filters are a separate text-pattern feature; EMF metrics are extracted automatically from the structured line and need no metric filter.

Other domains in this exam

See also the DVA-C02 cert hub, the study guide, and the cheat sheet.

Examworthy is not affiliated with or endorsed by Amazon Web Services. Original, blueprint-aligned practice material only.