Skip to content
Latchkey

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).

zappa
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

  1. Check whether the stage already exists with zappa status.
  2. Call zappa deploy for the first release and zappa update afterward.
  3. Make the CI step pick the right command idempotently.
Terminal
zappa status production >/dev/null 2>&1 \
  && zappa update production \
  || zappa deploy production

Standardize on update after bootstrap

Bootstrap the stage once manually, then have CI always run zappa update so the command is stable.

Terminal
zappa update production

How 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.

Frequently asked questions

What causes ""is not deployed!" / "already deployed""?
The stage has no existing Lambda/CloudFormation stack, so zappa update has nothing to update and reports it is not deployed.
How do I fix "is not deployed!" / "already deployed"?
Deploy if absent, otherwise update

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card