Create a managed deployment
-
Create a new work pool of type Prefect Managed in the UI or the CLI.
Use this command to create a new work pool using the CLI:
-
Create a deployment using the flow
deploy
method orprefect.yaml
. Specify the name of your managed work pool, as shown in this example that uses thedeploy
method:managed-execution.py -
With your CLI authenticated to your Prefect Cloud workspace, run the script to create your deployment:
- Run the deployment from the UI or from the CLI. This process runs a flow on remote infrastructure without any infrastructure setup, starting a worker, or requiring a cloud provider account.
Add dependencies
Prefect can install Python packages in the container that runs your flow at runtime. Specify these dependencies in the Pip Packages field in the UI, or by configuringjob_variables={"pip_packages": ["pandas", "prefect-aws"]}
in your deployment creation like this:
requirements.txt
file and reference it in your prefect.yaml pull step.
Networking
Static Outbound IP addresses
Flows running on Prefect Managed infrastructure can be assigned static IP addresses on outbound traffic, which will pose as thesource
address for requests interacting with your system or database.
Include these source
addresses in your firewall rules to explicitly allow flows to communicate with your environment.
184.73.85.134
52.4.218.198
44.217.117.74
Images
Managed execution requires that you run an official Prefect Docker image, such asprefecthq/prefect:3-latest
.
However, as noted above, you can install Python package dependencies at runtime.
If you need to use your own image, we recommend using another type of work pool.
Code storage
You must store flow code in an accessible remote location. Prefect supports git-based cloud providers such as GitHub, Bitbucket, or GitLab. Remote block-based storage is also supported, so S3, GCS, and Azure Blob are additional code storage options.Resources & Limitations
All flow runs receive:- 4vCPUs
- 16GB of RAM
- 128GB of ephemeral storage
PENDING
to COMPLETED
.