Prefect Deployments FAQ

How can I get started with deployments?

Discourse - getting started recipes incl. AWS, GCP and Azure specific setup

How to deploy all flows from a project at once? (both locally and from CI/CD)

This Discourse topic includes plenty of practical deployment CLI commands:

Docs

Blog posts

Getting started repositories with sample project structure

How to use the deployment CLI?

Can I re-upload my code without recreating a deployment?

Yes, but only if the parameter schema for the flow remains unchanged!

This is why the manifest file exists - to detect changes that could break a deployment.

Why does the build step need to evaluate the flow object?

To extract parameter schema and import paths for the entrypoint.

Can the apply step be executed from an environment that doesn’t have access to the flow code?

Yes, e.g., from a CI/CD tool or build server, as long as the YAML file has been already generated.

Do I need to keep and version-control the YAML file?

Storing the YAML file in your project repository with flows is entirely optional. If you want to, you can version-control those YAML files as a scaffold of deployment information for each flow.

One common use case we anticipate is using the YAML files as build artifacts of the CI/CD process, and relying purely on blocks and CLI as a way to continuously send deployment metadata to the Prefect backend.

How can I build a CI/CD pipeline for my flow deployments?

Can I specify deployments using Python code rather than CLI?

What is the relationship between an agent, work queue and a deployment?

I’m getting an error “File system … could not be created. You are likely missing a Python module required to use the given storage protocol” - how to solve that issue?

What happens when agent picks up a deployed flow run from a work queue?

What is the single source of truth for my deployment definition?

TL;DR it’s the state of flow deployment on the API backend, not the YAML file, Python declaration, or CLI command - those are only used to create or modify a deployment, but the API representation is the single source of truth.

How can I run my flow in a Docker container?

How to build deployments with flow code and dependencies being baked into a Docker image?

How can I delete all deployments to clear my workspace?

How can I toggle the schedule off for my flow deployment? (pause a schedule)

Do I need to schedule my flows, or can I run those based on events?

How to run my flows from AWS Lambda?

How to deploy my flow as a continuous real-time streaming service to AWS?

How can I orchestrate multiple deployments in a flow of flows (orchestrator pattern)?

How to implement a manual approval

2 Likes