The lifecycle of a deployment determines its readiness to accept user requests and serve traffic.

From an API standpoint, each deployment has a readyState field which can take one of the following values:

  • INITIALIZING a deployment in this state is waiting on builds to complete

    • ERROR one or more builds failed
    • READY builds completed successfully or none were specified

An illustration of the deployment readyState lifecycle.

When a deployment is READY, our system guarantees that it can be served at any time and that all the underlying serverless functions are available in the specified regions.

No further state transitions are necessary, and all deployment entrypoints are expected to be served within milliseconds.

Builds Lifecycle

When a deployment has more than one underlying builds, each build has its own states and lifecycle.

Now CLI displays and updates the evolution of the builds' states until the deployment completes.

An illustration of a build's lifecycle.

Each build process goes through:

  • INITIALIZING the initial state
  • ANALYZING to determine if the build has to be performed or it can be de-duplicated

    • BUILDING while executing the Builder code

      • UPLOADING to upload the files and resulting lambdas

        • DEPLOYING to deploy the necessary files and functions

          • READY if the deployment is successful
          • ERROR if the deployment fails
        • ERROR if an upload fails
      • ERROR if an error occurs during the build code executions
    • READY if no build is necessary
    • ERROR if an error occurs during the analysis code execution