SAP-C02 Continuous Improvement for Existing Solutions Practice Question
A company uses AWS CodePipeline to deploy a web application to an Elastic Beanstalk environment. The deployment pipeline includes a source stage, a build stage using CodeBuild, and a deploy stage. Recently, deployments have been failing in the deploy stage with the error: 'The environment is in an invalid state for this operation.' The developer confirms the build artifacts are correct. What is the MOST likely cause?
⚠ Common exam trap
SAP-C02 often tests whether candidates blame infrastructure (load balancer, Auto Scaling, instance type) for a state-machine error that is actually caused by a concurrent deployment, so recognize the InvalidState signature.
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
✓
Another deployment or configuration update is already in progress on the environment
Elastic Beanstalk rejects a new deployment when the environment is already processing another deployment or configuration update, returning the 'invalid state for this operation' error. Because the build artifacts are confirmed correct, the most likely cause is a concurrent operation still in progress. Waiting for the in-flight operation to complete or canceling it resolves the failure.
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 environment's load balancer is not available
Why it's wrong here
An unavailable load balancer degrades environment health and triggers replacement, but the deploy API rejects operations based on environment status, not load balancer availability. Load balancer troubleshooting applies when requests fail while the environment itself remains deployable.
- ✗
The environment's Auto Scaling group has insufficient capacity
Why it's wrong here
Insufficient Auto Scaling capacity causes provisioning or health failures, not the invalid-state rejection returned when the environment is mid-operation or has a pending configuration update. Capacity planning is the right focus when scaling events or launch failures are observed.
- ✗
The Elastic Beanstalk environment uses a t2.micro instance type which is not supported by CodePipeline
Why it's wrong here
CodePipeline deploys to Elastic Beanstalk regardless of instance type; t2.micro is a valid environment tier, so it cannot produce an invalid-state error. Instance type selection matters when sizing capacity or cost, not when the deploy stage validates environment readiness.
- ✓
Another deployment or configuration update is already in progress on the environment
Why this is correct
Elastic Beanstalk permits only one operation at a time; a concurrent deployment or configuration update leaves the environment in an invalid state, so the deploy stage fails until that operation completes. This matches the stem's error precisely, not artifact or build problems.
Visual reference
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.