nerdexam
Amazon

DOP-C02 · Question #297

A DevOps engineer manages a Java-based application that runs in an Amazon Elastic Container Service (Amazon ECS) cluster on AWS Fargate. Auto scaling has not been configured for the application. The D

The correct answer is A. Deploy the Amazon CloudWatch agent as a container sidecar. Configure the CloudWatch agent D. Create an Amazon Managed Service for Prometheus workspace. Deploy AWS Distro for. Amazon CloudWatch is widely used to collect, store, and analyze metrics. By deploying the CloudWatch agent as a sidecar in the ECS task, it can scrape the JVM metrics from port 9404. This solution is simple and requires minimal configuration. Creating CloudWatch alarms based on t

Submitted by rachelw· Mar 6, 2026Resilient Cloud Solutions

Question

A DevOps engineer manages a Java-based application that runs in an Amazon Elastic Container Service (Amazon ECS) cluster on AWS Fargate. Auto scaling has not been configured for the application. The DevOps engineer has determined that the Java Virtual Machine (JVM) thread count is a good indicator of when to scale the application. The application serves customer traffic on port 8080 and makes JVM metrics available on port 9404. Application use has recently increased. The DevOps engineer needs to configure auto scaling for the application. Which solution will meet these requirements with the LEAST operational overhead? (Choose two.)

Options

  • ADeploy the Amazon CloudWatch agent as a container sidecar. Configure the CloudWatch agent
  • BDeploy the Amazon CloudWatch agent as a container sidecar. Configure a metric filter for the
  • CCreate an Amazon Managed Service for Prometheus workspace. Deploy AWS Distro for
  • DCreate an Amazon Managed Service for Prometheus workspace. Deploy AWS Distro for

How the community answered

(31 responses)
  • A
    84% (26)
  • B
    10% (3)
  • C
    6% (2)

Explanation

Amazon CloudWatch is widely used to collect, store, and analyze metrics. By deploying the CloudWatch agent as a sidecar in the ECS task, it can scrape the JVM metrics from port 9404. This solution is simple and requires minimal configuration. Creating CloudWatch alarms based on the JVM thread count and using a step scaling policy in Fargate ensures the application scales up or down as needed, based on specific thresholds of the thread count. Step scaling policy allows you to adjust the scale incrementally and according to predefined conditions, ensuring efficient scaling based on metrics. Amazon Managed Service for Prometheus is designed for large-scale metrics monitoring, and OpenTelemetry can be used to scrape JVM metrics from port 9404 and publish them to the Prometheus workspace. By deploying OpenTelemetry as a container sidecar, JVM metrics are collected and sent to the Prometheus workspace, where they can be monitored. You can use a target tracking scaling policy with Prometheus metrics as the scaling trigger, which automatically adjusts the number of Fargate tasks based on real-time JVM metrics. By using CloudWatch for simple monitoring and Prometheus with OpenTelemetry for more advanced metrics handling, this solution achieves both operational efficiency and scalability with minimal overhead.

Topics

#Custom metrics#Application auto scaling#CloudWatch agent#ECS Fargate#Prometheus

Community Discussion

No community discussion yet for this question.

Full DOP-C02 Practice