DVA-C02 practice question · Troubleshooting and Optimization
A developer runs aws ecs describe-services for a replica service and sees desiredCount: 4, runningCount: 2, and…
A developer runs aws ecs describe-services for a replica service and sees desiredCount: 4, runningCount: 2, and pendingCount: 2. What is the correct interpretation of these values?
- AThe service is trying to keep 4 tasks running. 2 tasks are in the RUNNING state, and 2 are in the PENDING state and haven't started yet.
- BThe service is configured for 2 tasks, and maximumPercent lets 2 more tasks start temporarily during a deployment.
- C4 tasks are running. 2 have passed load balancer health checks, and 2 are still waiting for their first health check.
- D2 tasks are running, and 2 tasks failed and stopped, which the scheduler will not attempt to replace.
Show the answer and explanation
Correct answer: A) The service is trying to keep 4 tasks running. 2 tasks are in the RUNNING state, and 2 are in the PENDING state and haven't started yet.
desiredCount is the number of tasks the service is trying to keep running. runningCount and pendingCount count the service's tasks currently in the RUNNING and PENDING states. A gap between them shows that the service hasn't reached its target yet.
Why each option is right or wrong
- A) Correct. desiredCount is the number of task instantiations the service tries to keep running. runningCount counts the service's tasks in the RUNNING state, and pendingCount counts tasks still in the PENDING state.
- B) Incorrect. desiredCount is the target number of tasks, so this service targets 4 tasks, not 2. maximumPercent sets an upper limit as a percentage of desiredCount during deployments. It isn't shown in these counts.
- C) Incorrect. runningCount counts only the tasks in the RUNNING state, so only 2 tasks are running. pendingCount reflects the PENDING lifecycle state, not health check results.
- D) Incorrect. pendingCount counts tasks in the PENDING state, not stopped tasks. A replica service also keeps working to reach desiredCount by launching replacement tasks.
- Exam domain
- Troubleshooting and Optimization · 18% of DVA-C02
- Question type
- Multiple choice (one answer)
Related DVA-C02 questions
- A developer wants to trace a request as it flows through multiple microservices (API Gateway, Lambda, DynamoDB) to…Troubleshooting and Optimization
- Where would a developer look first to see the console.log output and runtime errors from a specific AWS Lambda function…Troubleshooting and Optimization
- Which CloudWatch feature lets a developer run SQL-like queries directly against log data to quickly find patterns, such…Troubleshooting and Optimization
- An API Gateway endpoint backed by Lambda is returning a high rate of 429 (Too Many Requests) errors to clients during a…Troubleshooting and Optimization
All 67 free DVA-C02 questions by domain · 15 sample questions on one page
Practise the full DVA-C02 exam
This question is one of a small free sample from the CertRidge DVA-C02 bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.
Original question written from the official exam guide. Not affiliated with AWS; never copied from the real exam.
Worth reading: DVA-C02 cheat sheet, Lambda, DynamoDB, API Gateway, IAM and Cognito, messaging, CI/CD and X-Ray in tables, plus what DVA-C03 changes.