DOP-C02 exam dumps

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

Single answer

Your organization is running a fleet of EC2 instances behind an Auto Scaling group. These instances process tasks from an SQS queue. The team has noticed delays in task processing during peak traffic, and some tasks are being dropped due to timeouts. You have been asked to design a solution that ensures scalability during traffic spikes while minimizing costs. Which approach should you take?

  1. A

    Configure the Auto Scaling group to scale based on the number of messages in the SQS queue.

  2. B

    Manually add additional EC2 instances to the Auto Scaling group during traffic spikes.

  3. C

    Increase the timeout value for message visibility in the SQS queue.

  4. D

    Use AWS Lambda to process messages from the SQS queue instead of EC2 instances.

Show answer and explanation

Correct answer: A

Explanation

Scaling the Auto Scaling group based on the SQS queue length is a cost-effective and scalable solution to handle workload spikes. By configuring the Auto Scaling group to monitor the number of messages in the queue, it can automatically adjust the number of EC2 instances to ensure timely processing of tasks. This approach eliminates the delays and dropped tasks caused by traffic surges, while adhering to the principles of elasticity and cost optimization.

  • A. Correct.

    Correct. Scaling the Auto Scaling group based on the SQS queue length ensures that your application scales dynamically during traffic spikes to handle the increased workload, minimizing delays and dropped tasks.

  • B. Incorrect.

    Incorrect. Manually adding instances is not efficient or scalable, as it requires human intervention and does not align with the principles of automated scaling.

  • C. Incorrect.

    Incorrect. Increasing the message visibility timeout might reduce the chances of tasks being dropped but does not address the root cause of insufficient processing capacity during traffic spikes.

  • D. Incorrect.

    Incorrect. While AWS Lambda can be used to process SQS messages, it may not be the best solution if your application is optimized for EC2 instances. Additionally, switching to Lambda might require significant architectural changes, which are not mentioned in the scenario.

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