Zappa "Warning! ... is not deployed" / already deployed in CI
Zappa separates the first deploy (zappa deploy) from later releases (zappa update). Running the wrong one fails: deploy errors if the stage already exists, and update errors if it was never deployed.
What this error means
zappa update fails with "Warning! <stage> is not deployed!" (nothing to update), or zappa deploy fails with "<stage> is already deployed!" (use update instead).
Warning! Status check on the deployed lambda failed.
Error: 'production' is not deployed! Have you deployed yet?
(To deploy, run zappa deploy production)Common causes
update run before the first deploy
The stage has no existing Lambda/CloudFormation stack, so zappa update has nothing to update and reports it is not deployed.
deploy run when the stage already exists
A pipeline always calling zappa deploy fails on the second run because the stage is already deployed and must be updated.
How to fix it
Deploy if absent, otherwise update
- Check whether the stage already exists with zappa status.
- Call zappa deploy for the first release and zappa update afterward.
- Make the CI step pick the right command idempotently.
zappa status production >/dev/null 2>&1 \
&& zappa update production \
|| zappa deploy productionStandardize on update after bootstrap
Bootstrap the stage once manually, then have CI always run zappa update so the command is stable.
zappa update productionHow to prevent it
- Detect deploy-vs-update with zappa status in the pipeline.
- Bootstrap each stage once, then update on every CI run.
- Keep stage names consistent between deploy and update calls.