SAP-C02 Continuous Improvement for Existing Solutions Practice Question
A company has a production Amazon ECS service running on Fargate. The service needs to be updated to use a new task definition with different environment variables. The company wants to perform a rolling update with minimal impact. What is the correct way to update the service?
⚠ Common exam trap
SAP-C02 often tests the difference between ForceNewDeployment (same task definition, just restart) and UpdateService with a new revision (actual rolling update) — candidates who pick 'restart the service' miss that restart does not change the task definition.
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
✓
Update the service with the new task definition and use a rolling update deployment controller.
Updating an ECS service with a new task definition while using the rolling update deployment controller (ECS) performs a controlled replacement of tasks, maintaining the desired count and minimizing downtime. This is the standard, supported way to deploy a new task definition to an existing service.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Delete the existing service and recreate it with the new task definition.
Why it's wrong here
Deleting and recreating the service causes downtime and loses service configuration, contradicting the rolling-update requirement. It is tempting because recreating does apply the new task definition, but it would be acceptable only for non-production services where an outage is tolerable.
- ✗
Modify the task definition and then restart the service.
Why it's wrong here
Restarting a service redeploys the existing task definition revision, so the new environment variables never take effect. It is tempting because restarting forces fresh tasks, which helps with stuck containers, but ECS rolling updates require registering a new revision and calling UpdateService with the new task definition.
- ✓
Update the service with the new task definition and use a rolling update deployment controller.
Why this is correct
Updating the service with the new task definition and the rolling deployment controller replaces tasks incrementally, honouring the minimum healthy percent and maximum percent settings. This satisfies the minimal-impact constraint, since capacity remains available throughout, unlike recreate, which stops all tasks before starting replacements.
- ✗
Create a new service with the new task definition and delete the old one.
Why it's wrong here
Creating a second service duplicates the ALB target group registration and leaves two services competing for the same listener, causing downtime during cutover rather than a rolling replacement. This pattern suits blue/green deployments with CodeDeploy traffic shifting, not an in-place environment variable change.
About these practice questions
This SAP-C02 question is part of Courseiva's 984-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint
This SAP-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 SAP-C02 exam.