DOP-C02 exam dumps

DOP-C02 practice question 314 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 314

Single answer

Your team is managing an application hosted on Amazon ECS using the Fargate launch type. Recently, the application experienced performance degradation during high traffic periods, and your team identified that the containerized application needs more CPU and memory resources during peak load times. To address this, you want to implement an automated solution to adjust the task resource allocation dynamically based on traffic patterns. Which approach should you take?

  1. A

    Configure an ECS Service Auto Scaling policy based on the CPU and memory utilization metrics from Amazon CloudWatch.

  2. B

    Use AWS Lambda to automatically update the task definition with higher CPU and memory values during peak traffic.

  3. C

    Modify the ECS cluster's instance type to provide more CPU and memory resources to the tasks.

  4. D

    Implement an Application Load Balancer (ALB) to distribute traffic evenly across tasks, avoiding resource saturation.

Show answer and explanation

Correct answer: A

Explanation

The best practice for addressing resource scaling in ECS with Fargate is to use ECS Service Auto Scaling. This approach utilizes CloudWatch metrics to dynamically adjust the number of tasks in a service, ensuring optimal resource utilization and application performance during traffic fluctuations. Other options, such as manually modifying task definitions or relying on an ALB, do not address the dynamic scaling requirements effectively.

  • A. Correct.

    This is the correct answer. ECS Service Auto Scaling policies can automatically adjust the desired count of tasks in a service based on CloudWatch metrics, such as CPU or memory utilization. This ensures that tasks scale up or down dynamically based on application demand.

  • B. Incorrect.

    This is incorrect. While AWS Lambda could theoretically be used to update task definitions, this approach is not efficient or recommended for addressing real-time resource scaling needs.

  • C. Incorrect.

    This is incorrect. Modifying the ECS cluster's instance type is not relevant in the context of Fargate, as Fargate abstracts the underlying infrastructure, and resource allocation is defined at the task level.

  • D. Incorrect.

    This is incorrect. While an ALB can help distribute traffic, it does not dynamically adjust task resource allocations or scale the number of tasks based on load.

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