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