Question 1,515 of 1,616
Development with AWS ServiceshardMultiple ChoiceObjective-mapped

ECS Service Auto Scaling with SQS — Target Tracking Custom Metric | AWS Developer Associate Explained

This DVA-C02 practice question tests your understanding of development with aws services. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. A key principle to apply: target tracking scaling policy. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A company runs a microservices application on Amazon ECS with Fargate. The application consists of three services: frontend, orders, and payments. The frontend service is behind an Application Load Balancer (ALB). The orders service processes requests from frontend and sends messages to the payments service via an Amazon SQS queue. The payments service polls the queue. Recently, during peak hours, the orders service experiences high latency and the SQS queue depth increases significantly. The monitoring shows that the payments service is not keeping up. The company wants to scale the payments service based on the queue depth. The developer has configured an ECS Service Auto Scaling target tracking policy using the SQS queue's ApproximateNumberOfMessagesVisible metric. However, the payments service is not scaling up as expected. What is the most likely cause?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The payments service has reached the maximum number of tasks allowed by the service quota.

The most likely cause is that the payments service has reached the maximum number of tasks allowed by the service quota or the maximum tasks setting in the service configuration. ECS Service Auto Scaling with target tracking using the SQS queue depth metric works correctly, but it cannot scale beyond the maximum tasks limit. Once the desired count reaches this limit, no further scaling occurs even if the queue depth increases. Option A is incorrect because ECS Service Auto Scaling supports the SQS ApproximateNumberOfMessagesVisible metric as a predefined metric for target tracking. Option B is incorrect because SQS automatically publishes this metric to CloudWatch. Option D is incorrect because polling frequency does not affect the scaling policy's ability to adjust the task count.

Key principle: Target tracking scaling policy

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The target tracking policy is not configured correctly because ECS Service Auto Scaling requires a custom metric, and the metric may not have been published yet.

    Why it's wrong here

    This is incorrect. ECS Service Auto Scaling supports the SQS ApproximateNumberOfMessagesVisible metric as a predefined metric for target tracking. No custom metric is required.

  • The SQS queue is not sending the ApproximateNumberOfMessagesVisible metric to CloudWatch.

    Why it's wrong here

    This is unlikely because SQS automatically publishes the ApproximateNumberOfMessagesVisible metric to CloudWatch.

  • The payments service has reached the maximum number of tasks allowed by the service quota.

    Why this is correct

    This is the most likely cause. If the service has reached the maximum number of tasks allowed by the service quota or the maximum tasks setting in the service configuration, the scaling policy will not be able to increase tasks further, preventing the desired scaling.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    Target tracking scaling policy

  • The payments service is not configured to poll the SQS queue frequently enough.

    Why it's wrong here

    Polling frequency affects message processing but does not prevent the scaling policy from adjusting the task count. The scaling policy should still scale up based on queue depth.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Candidates may assume that the need for a custom metric is the issue, but ECS Service Auto Scaling natively supports SQS queue depth metrics. The real pitfall is overlooking the maximum tasks limit that prevents further scaling.

Detailed technical explanation

How to think about this question

ECS Service Auto Scaling with target tracking requires a predefined or custom metric that represents the average utilization or load. For SQS-based scaling, you must create a custom CloudWatch metric using the SQS queue's ApproximateNumberOfMessagesVisible and then use that metric in a target tracking policy. The scaling policy then adjusts the desired count of tasks to maintain a target value (e.g., 100 messages per task). Without this custom metric, the policy has no data to evaluate, so no scaling occurs. A common real-world scenario is when developers mistakenly use the raw SQS metric directly in the policy, which is not supported, leading to no scaling action.

KKey Concepts to Remember

  • Target tracking scaling policy
  • Maximum tasks

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Target tracking scaling policy

Real-world example

How this comes up in practice

An e-commerce site experiences heavy traffic on Black Friday and near-zero traffic during off-peak weeks. Rather than provisioning permanent large VMs, the team uses auto-scaling groups that add capacity automatically under load and reduce it overnight. Questions like this test whether you understand elasticity, availability zones, and cloud compute scaling patterns.

What to study next

Got this wrong? Here's your next step.

Review target tracking scaling policy, then practise related DVA-C02 questions on the same topic to reinforce the concept.

Related practice questions

Related DVA-C02 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free DVA-C02 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this DVA-C02 question test?

Development with AWS Services — This question tests Development with AWS Services — Target tracking scaling policy.

What is the correct answer to this question?

The correct answer is: The payments service has reached the maximum number of tasks allowed by the service quota. — The most likely cause is that the payments service has reached the maximum number of tasks allowed by the service quota or the maximum tasks setting in the service configuration. ECS Service Auto Scaling with target tracking using the SQS queue depth metric works correctly, but it cannot scale beyond the maximum tasks limit. Once the desired count reaches this limit, no further scaling occurs even if the queue depth increases. Option A is incorrect because ECS Service Auto Scaling supports the SQS ApproximateNumberOfMessagesVisible metric as a predefined metric for target tracking. Option B is incorrect because SQS automatically publishes this metric to CloudWatch. Option D is incorrect because polling frequency does not affect the scaling policy's ability to adjust the task count.

What should I do if I get this DVA-C02 question wrong?

Review target tracking scaling policy, then practise related DVA-C02 questions on the same topic to reinforce the concept.

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

What is the key concept behind this question?

Target tracking scaling policy

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more ways this is tested on DVA-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company is running a containerized application on Amazon ECS with Fargate. The application needs to process messages from an Amazon SQS queue. The developer must ensure that the application can scale out based on the queue depth. Which THREE steps should the developer take to implement this? (Choose THREE.)

hard
  • A.Configure DynamoDB auto scaling for the application's table to handle increased load.
  • B.Configure an ECS Service Auto Scaling target tracking policy using the SQS queue's ApproximateNumberOfMessagesVisible metric.
  • C.Implement the application to delete messages from the queue after successful processing.
  • D.Grant the ECS task IAM role permission to poll and delete messages from the SQS queue.
  • E.Register the ECS tasks with an Application Load Balancer target group to distribute messages.

Why B: Option B is correct because Amazon ECS Service Auto Scaling can use a target tracking scaling policy based on the SQS queue's `ApproximateNumberOfMessagesVisible` metric. This allows the ECS service to automatically increase or decrease the number of running tasks in response to the queue depth, ensuring the application scales out to process messages efficiently.

Keep practising

More DVA-C02 practice questions

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.