Elastic Beanstalk "eb deploy" environment is not Ready in CI
Elastic Beanstalk only accepts a deploy when the environment status is Ready. The environment was still Updating or Launching from a previous operation, so the CLI refuses the new deploy.
What this error means
eb deploy aborts with "ERROR: Environment <name> is not in the Ready state. Cannot apply the update." or "is not Ready" without starting the deployment.
ERROR: Environment named myapp-prod is not in the Ready state.
Cannot apply the update. The environment is currently in the Updating state.Common causes
A concurrent or unfinished prior deploy
An earlier deploy, scaling event, or config change is still in progress, so the environment is Updating and rejects a second operation.
The environment is stuck recovering
A failed prior deploy left the environment mid-update; it must reach Ready (or be aborted) before another deploy is allowed.
How to fix it
Wait for Ready before deploying
- Poll the environment status until it returns Ready.
- Serialize deploys so only one runs against an environment at a time.
- Then re-run eb deploy.
aws elasticbeanstalk wait environment-updated \
--environment-name myapp-prodAbort a stuck update
If the environment is wedged in Updating, abort the current operation, let it return to Ready, then deploy.
aws elasticbeanstalk abort-environment-update \
--environment-name myapp-prodHow to prevent it
- Gate deploys so only one runs per environment concurrently.
- Wait on environment-updated between operations in CI.
- Avoid overlapping config changes and code deploys.