DOP-C02 exam dumps

DOP-C02 practice question 219 of 411

AWS Certified DevOps Engineer - Professional. Professional level, Amazon Web Services. Free question with the correct answer and a full explanation.

DOP-C02 Question 219

Single answer

Your team has built a custom application running on Amazon EC2 instances that emits metrics to Amazon CloudWatch. You notice that the metrics are not showing in the CloudWatch console. After investigating, you find the metrics are being sent to the wrong namespace. Which of the following actions should you take to correctly display the metrics in CloudWatch under the intended namespace?

  1. A

    Update the application code to emit the metrics with the correct namespace and redeploy the application.

  2. B

    Use the AWS CLI to move the metrics from the incorrect namespace to the correct one in CloudWatch.

  3. C

    Create a CloudWatch metric filter to map the metrics from the incorrect namespace to the correct namespace.

  4. D

    Delete the incorrect namespace and re-create the metrics under the correct namespace.

Show answer and explanation

Correct answer: A

Explanation

Amazon CloudWatch namespaces are used to organize metrics logically. Once a metric is published to a specific namespace, it cannot be moved or edited. The only way to ensure metrics appear under the correct namespace is to update the application emitting the metrics to use the proper namespace and redeploy the application. Other options, such as moving metrics or deleting namespaces, are not supported by CloudWatch.

  • A. Correct.

    This is the correct approach. CloudWatch namespaces are defined when metrics are published, and they cannot be edited or moved later. Updating the application to emit metrics with the correct namespace is the only way to fix this issue.

  • B. Incorrect.

    CloudWatch does not provide a capability to move metrics between namespaces. Metrics are immutable once published.

  • C. Incorrect.

    Metric filters are used to search and extract patterns from log data, not to map metrics between namespaces.

  • D. Incorrect.

    Namespaces in CloudWatch are automatically created when metrics are published. Deleting a namespace is not possible, and re-creating it would not address the issue of metrics already published under the incorrect namespace.

Timed practice exam

Take a DOP-C02 practice test under exam conditions

75 questions in 180 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam