The serve method creates a deployment from your flow and immediately begins listening for scheduled runs to execute.
Providing cron="* * * * *" to .serve associates a schedule with your flow so it will run every minute of every day.
For more configuration, you can create a deployment that uses a work pool.
Reasons to create a work-pool based deployment include:
Wanting to run your flow on dynamically provisioned infrastructure
Needing more control over the execution environment on a per-flow run basis
Creating an infrastructure template to use across deployments
Work pools are popular with data platform teams because they allow you to manage infrastructure configuration across an organization.Prefect offers two options for creating deployments with dynamic infrastructure:
To define a deployment with a Python script, use the flow.deploy method.Here’s an example of a deployment that uses a work pool and bakes the code into a Docker image.
If you’d rather take a declarative approach to defining a deployment through a YAML file, use a prefect.yaml file.Prefect provides an interactive CLI that walks you through creating a prefect.yaml file:
prefect deploy
The result is a prefect.yaml file for deployment creation.
The file contains build, push, and pull steps for building a Docker image, pushing code to a Docker registry, and pulling code at runtime.
Learn more about creating deployments with a YAML file in Define deployments with YAML.Prefect also provides CI/CD options for automatically creating YAML-based deployments.
Choosing between deployment methodsFor many cases, serve is sufficient for scheduling and orchestration.
The work pool / worker paradigm via .deploy() or prefect deploy can be great for complex infrastructure requirements and isolated flow run environments.
You are not locked into one method and can combine approaches as needed.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Prefect","colors":{"primary":"#2D6DF6","light":"#5F92FF","dark":"#2D6DF6"},"logo":{"light":"https://mintcdn.com/prefect-bd373955/2_4m_dDmEdgqK7r9/logos/logo-wordmark-dark.svg?fit=max\u0026auto=format\u0026n=2_4m_dDmEdgqK7r9\u0026q=85\u0026s=076c95a93dbe29192ba9129faefcc878","dark":"https://mintcdn.com/prefect-bd373955/2_4m_dDmEdgqK7r9/logos/logo-wordmark-light.svg?fit=max\u0026auto=format\u0026n=2_4m_dDmEdgqK7r9\u0026q=85\u0026s=46ef25a1069c303ca7d9e24ec801e760","href":"https://www.prefect.io/docs"},"favicon":"https://mintcdn.com/prefect-bd373955/2_4m_dDmEdgqK7r9/logos/favicon.svg?fit=max\u0026auto=format\u0026n=2_4m_dDmEdgqK7r9\u0026q=85\u0026s=c0e62122cb72036e569b2656916a1b33","api":{"playground":{"display":"simple"}},"appearance":{"default":"light","strict":false},"navbar":{"primary":{"type":"github","href":"https://github.com/PrefectHQ/Prefect"}},"footer":{"socials":{"bluesky":"https://bsky.app/profile/prefect.io","github":"https://github.com/PrefectHQ/prefect","linkedin":"https://www.linkedin.com/company/prefect/mycompany","slack":"https://prefect.io/slack","x":"https://x.com/PrefectIO","youtube":"https://www.youtube.com/c/PrefectIO"}},"seo":{"metatags":{"canonical":"https://www.prefect.io/docs"}},"integrations":{"ga4":{"measurementId":"G-8GR5P04T5Y"},"gtm":{"tagId":"GTM-N633BZ8"}},"errors":{"404":{"redirect":false}},"contextual":{"options":["copy","view"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"prefect-bd373955","hasAudioNarration":false,"actualSubdomain":"prefect-bd373955","customDomains":[],"gitSource":{"type":"github","owner":"prefecthq","repo":"prefect","deployBranch":"main","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aebae2be8d23663794098e8","collectionId":"28a32e15-27de-4edf-91c2-0682e8bb6873","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aebae2be8d23663794098e8"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aee42ba68213475f1385309","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"API Reference","count":1172},{"language":"default","tag":"Python SDK Reference","count":364},{"language":"default","tag":"Integrations","count":329},{"language":"default","tag":"REST API","count":183},{"language":"default","tag":"Server API","count":181},{"language":"default","tag":"prefect.server","count":148},{"language":"default","tag":"SDK Reference","count":127},{"language":"default","tag":"How-to Guides","count":71},{"language":"default","tag":"models","count":60},{"language":"default","tag":"api","count":39}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":"#topbar-cta-button>a>span{background-color:#2d6df6;border-radius:0.25rem}#topbar-cta-button>a{padding:0.5rem 1rem}#topbar-cta-button>a div>span{font-weight:400;letter-spacing:0.4px}#topbar-cta-button>a div>span,#topbar-cta-button>a div>svg{color:#fff}img{filter:none!important}@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700\u0026display=swap\");@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700\u0026display=swap\");body{font-family:\"Inter\", sans-serif}h1,h2,h3,h4,h5,h6{font-family:\"Roboto\", sans-serif}p{font-family:\"Inter\", sans-serif}[role=\"listitem\"] *:last-child:not(.code-block,.link){border-bottom:none!important}.badge{display:table;margin:0 0 1rem;font-family:\"Inter\", sans-serif;font-size:0.6875rem;font-weight:600;line-height:1;letter-spacing:0.02em;text-transform:uppercase;padding:0.35em 0.6em;border-radius:0.375rem;white-space:nowrap}.badge.cloud{color:#fff;background-color:#2d6df6}.badge.cloud::after{content:\"Prefect Cloud\"}"},{"filePath":"assets/code.css","content":".namespace{opacity:0.7}.token.doctype .token.doctype-tag{color:#79c0ff}.token.doctype .token.name{color:#d2a8ff}.token.comment,.token.prolog{color:#8b949e}.token.punctuation,.language-html .language-css .token.punctuation,.language-html .language-javascript .token.punctuation{color:#c9d1d9}.token.property,.token.tag,.token.boolean,.token.number,.token.constant,.token.symbol,.token.inserted,.token.unit{color:#79c0ff}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.deleted{color:#79c0ff}.token.plain-text{color:#fafafa}.language-css .token.string.url{text-decoration:underline}.token.operator,.token.entity{color:#79c0ff}.token.operator.arrow{color:#ff7b72}.token.atrule{color:#79c0ff}.token.atrule .token.rule{color:#d2a8ff}.token.atrule .token.url{color:#79c0ff}.token.atrule .token.url .token.function{color:#79c0ff}.token.atrule .token.url .token.punctuation{color:#d4d4d4}.token.keyword{color:#ff7b72}.token.keyword.module,.token.keyword.control-flow{color:#c586c0}.token.function,.token.function .token.maybe-class-name{color:#d2a8ff}.token.regex{color:#a5d6ff}.token.important{color:#ff7b72}.token.italic{font-style:italic;color:#c9d1d9}.token.constant{color:#79c0ff}.token.class-name,.token.maybe-class-name{color:#d2a8ff}.token.console{color:#9cdcfe}.token.parameter{color:#79c0ff}.token.interpolation{color:#79c0ff}.token.punctuation.interpolation-punctuation{color:#569cd6}.token.boolean{color:#ff7b72}.token.property,.token.variable,.token.imports .token.maybe-class-name,.token.exports .token.maybe-class-name{color:#79c0ff}.token.selector{color:#7ee787}.token.escape{color:#7ee787}.token.tag{color:#7ee787}.token.tag .token.punctuation{color:#808080}.token.cdata{color:#808080}.token.attr-name{color:#79c0ff}.token.attr-value,.token.attr-value .token.punctuation{color:#a5d6ff}.token.attr-value .token.punctuation.attr-equals{color:#d4d4d4}.token.entity{color:#79c0ff}.token.namespace{color:#7ee787}.token.operator{color:#94a3b8}pre[class*=\"language-javascript\"],code[class*=\"language-javascript\"],pre[class*=\"language-jsx\"],code[class*=\"language-jsx\"],pre[class*=\"language-typescript\"],code[class*=\"language-typescript\"],pre[class*=\"language-tsx\"],code[class*=\"language-tsx\"]{color:#79c0ff}pre[class*=\"language-css\"],code[class*=\"language-css\"]{color:#a5d6ff}pre[class*=\"language-html\"],code[class*=\"language-html\"]{color:#c9d1d9}.language-regex .token.anchor{color:#dcdcaa}.language-html .token.punctuation{color:#808080}span.language-json .token.punctuation{color:#4b5563}:is(.dark span.language-json .token.punctuation){color:#d1d5db}span.language-json .token.property{color:#0284c7}:is(.dark span.language-json .token.property){color:9cdcfe}span.language-json .token.string{color:#d97706}:is(.dark span.language-json .token.string){color:#ce9178}span.language-json .token.number{color:#16a34a}:is(.dark span.language-json .token.number){color:#b5cea8}.line-highlight.line-highlight{background:#f7ebc6;box-shadow:inset 5px 0 0 #f7d87c;z-index:0}"}],"page":{"pagePath":"v3/how-to-guides/deployments/create-deployments","slug":"/v3/how-to-guides/deployments/create-deployments","pageMetadata":{"title":"How to create deployments","sidebarTitle":"Create Deployments","description":"Learn how to create deployments via the CLI, Python, or Terraform.","keywords":["deployment","create","CLI","Python","Terraform","deploy"],"href":"/v3/how-to-guides/deployments/create-deployments"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn how to create deployments via the CLI, Python, or Terraform.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const API=({name,href})=>{const _components={a:`a`,..._provideComponents()};return _jsxs(`p`,{children:[`You can manage `,name,` with the `,_jsx(_components.a,{href,children:`Prefect API`}),`.`]})};const deployments={cli:`https://www.prefect.io/docs/v3/api-ref/cli/deployment`,api:`https://app.prefect.cloud/api/docs#tag/Deployments`,tf:`https://registry.terraform.io/providers/PrefectHQ/prefect/latest/docs/resources/deployment`};const TF=({name,href})=>{const _components={a:`a`,..._provideComponents()};return _jsxs(`p`,{children:[`You can manage `,name,` with the `,_jsx(_components.a,{href,children:`Terraform provider for Prefect`}),`.`]})};function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`There are several ways to create deployments, each catering to different organizational needs.`}),`\n`,_jsx(Heading,{level:`2`,id:`create-deployments-with-static-infrastructure`,children:`Create deployments with static infrastructure`}),`\n`,_jsxs(Heading,{level:`3`,id:`create-a-deployment-with-serve`,children:[`Create a deployment with `,_jsx(_components.code,{children:`serve`})]}),`\n`,_jsx(_components.p,{children:`This is the simplest way to get started with deployments:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prefect `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` flow`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`@flow`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` my_flow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hello, Prefect!\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` __name__`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"__main__\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` my_flow.serve(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"my-first-deployment\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`cron`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"* * * * *\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`serve`}),` method creates a deployment from your flow and immediately begins listening for scheduled runs to execute.\nProviding `,_jsx(_components.code,{children:`cron=\"* * * * *\"`}),` to `,_jsx(_components.code,{children:`.serve`}),` associates a schedule with your flow so it will run every minute of every day.`]}),`\n`,_jsx(Heading,{level:`2`,id:`create-deployments-with-dynamic-infrastructure`,children:`Create deployments with dynamic infrastructure`}),`\n`,_jsx(_components.p,{children:`For more configuration, you can create a deployment that uses a work pool.\nReasons to create a work-pool based deployment include:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Wanting to run your flow on dynamically provisioned infrastructure`}),`\n`,_jsx(_components.li,{children:`Needing more control over the execution environment on a per-flow run basis`}),`\n`,_jsx(_components.li,{children:`Creating an infrastructure template to use across deployments`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Work pools are popular with data platform teams because they allow you to manage infrastructure configuration across an organization.`}),`\n`,_jsxs(_components.p,{children:[`Prefect offers two options for creating deployments with `,_jsx(_components.a,{href:`/v3/concepts/work-pools`,children:`dynamic infrastructure`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/v3/how-to-guides/deployments/deploy-via-python`,children:`Deployments created with the Python SDK`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/v3/how-to-guides/deployments/prefect-yaml`,children:`Deployments created with a YAML file`})}),`\n`]}),`\n`,_jsxs(Heading,{level:`3`,id:`create-a-deployment-with-deploy`,children:[`Create a deployment with `,_jsx(_components.code,{children:`deploy`})]}),`\n`,_jsxs(_components.p,{children:[`To define a deployment with a Python script, use the `,_jsx(_components.code,{children:`flow.deploy`}),` method.`]}),`\n`,_jsx(_components.p,{children:`Here’s an example of a deployment that uses a work pool and bakes the code into a Docker image.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prefect `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` flow`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`@flow`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` my_flow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hello, Prefect!\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` __name__`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"__main__\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` my_flow.deploy(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"my-second-deployment\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` work_pool_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"my-work-pool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` image`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"my-image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` push`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`False`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` cron`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"* * * * *\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`To learn more about the `,_jsx(_components.code,{children:`deploy`}),` method, see `,_jsx(_components.a,{href:`/v3/how-to-guides/deployments/deploy-via-python`,children:`Deploy flows with Python`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`create-a-deployment-with-a-yaml-file`,children:`Create a deployment with a YAML file`}),`\n`,_jsxs(_components.p,{children:[`If you’d rather take a declarative approach to defining a deployment through a YAML file, use a `,_jsxs(_components.a,{href:`/v3/how-to-guides/deployments/prefect-yaml`,children:[_jsx(_components.code,{children:`prefect.yaml`}),` file`]}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Prefect provides an interactive CLI that walks you through creating a `,_jsx(_components.code,{children:`prefect.yaml`}),` file:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`prefect`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` deploy`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The result is a `,_jsx(_components.code,{children:`prefect.yaml`}),` file for deployment creation.\nThe file contains `,_jsx(_components.code,{children:`build`}),`, `,_jsx(_components.code,{children:`push`}),`, and `,_jsx(_components.code,{children:`pull`}),` steps for building a Docker image, pushing code to a Docker registry, and pulling code at runtime.\nLearn more about creating deployments with a YAML file in `,_jsx(_components.a,{href:`/v3/how-to-guides/deployments/prefect-yaml`,children:`Define deployments with YAML`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Prefect also provides `,_jsx(_components.a,{href:`/v3/advanced/deploy-ci-cd`,children:`CI/CD options`}),` for automatically creating YAML-based deployments.`]}),`\n`,_jsx(Heading,{level:`3`,id:`create-a-deployment-with-terraform`,children:`Create a deployment with Terraform`}),`\n`,_jsx(_MdxComponentBoundary,{name:`TF`,children:_jsx(TF,{name:`deployments`,href:deployments.tf})}),`\n`,_jsx(Heading,{level:`3`,id:`create-a-deployment-with-the-api`,children:`Create a deployment with the API`}),`\n`,_jsx(_MdxComponentBoundary,{name:`API`,children:_jsx(API,{name:`deployments`,href:deployments.api})}),`\n`,_jsxs(Tip,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Choosing between deployment methods`})}),_jsxs(_components.p,{children:[`For many cases, `,_jsx(_components.code,{children:`serve`}),` is sufficient for scheduling and orchestration.\nThe work pool / worker paradigm via `,_jsx(_components.code,{children:`.deploy()`}),` or `,_jsx(_components.code,{children:`prefect deploy`}),` can be great for complex infrastructure requirements and isolated flow run environments.\nYou are not locked into one method and can combine approaches as needed.`]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{API,deployments,TF,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"How to create deployments","sidebarTitle":"Create Deployments","description":"Learn how to create deployments via the CLI, Python, or Terraform.","keywords":["deployment","create","CLI","Python","Terraform","deploy"],"href":"/v3/how-to-guides/deployments/create-deployments"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[139,781,")=>null;const deployments=undefined;const TF=()=>null;functi"],[14511,14543,"``})}),`\n`,_jsx(Head"],[14728,14761,"``})}),`\n`,_jsxs(Tip"]]},"mdxExtracts":{"tableOfContents":[{"title":"Create deployments with static infrastructure","slug":"create-deployments-with-static-infrastructure","depth":2,"children":[{"title":"Create a deployment with serve","slug":"create-a-deployment-with-serve","depth":3,"children":[]}]},{"title":"Create deployments with dynamic infrastructure","slug":"create-deployments-with-dynamic-infrastructure","depth":2,"children":[{"title":"Create a deployment with deploy","slug":"create-a-deployment-with-deploy","depth":3,"children":[]},{"title":"Create a deployment with a YAML file","slug":"create-a-deployment-with-a-yaml-file","depth":3,"children":[]},{"title":"Create a deployment with Terraform","slug":"create-a-deployment-with-terraform","depth":3,"children":[]},{"title":"Create a deployment with the API","slug":"create-a-deployment-with-the-api","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/prefect-bd373955/4f3e55fa53d4a575/script.js","/docs/_mintlify/custom/prefect-bd373955/87a13774513287dd/osano.js","/docs/_mintlify/custom/prefect-bd373955/e7b7298d9b02df32/outbound-referrer.js"],"subdomain":"prefect-bd373955","siteName":"Prefect","title":"How to create deployments - Prefect","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-27T20:19:04.321Z","originalFileLocation":"v3/how-to-guides/deployments/create-deployments.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn how to create deployments via the CLI, Python, or Terraform.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Prefect\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"How to create deployments - Prefect\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to create deployments via the CLI, Python, or Terraform.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Prefect\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.prefect.io/docs/v3/how-to-guides/deployments/create-deployments\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://prefect-bd373955.mintlify.site/docs/_mintlify/api/og/v2?division=Deployments\u0026amp;title=How+to+create+deployments\u0026amp;description=Learn+how+to+create+deployments+via+the+CLI%2C+Python%2C+or+Terraform.\u0026amp;theme=ce2957f9cdece17b41396978\u0026amp;signature=bb7504adfc1c4db196f9add452b74703c7224c22cba49c5f6ac45fae434d8445\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"How to create deployments - Prefect\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to create deployments via the CLI, Python, or Terraform.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://prefect-bd373955.mintlify.site/docs/_mintlify/api/og/v2?division=Deployments\u0026amp;title=How+to+create+deployments\u0026amp;description=Learn+how+to+create+deployments+via+the+CLI%2C+Python%2C+or+Terraform.\u0026amp;theme=ce2957f9cdece17b41396978\u0026amp;signature=bb7504adfc1c4db196f9add452b74703c7224c22cba49c5f6ac45fae434d8445\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Prefect\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2D6DF6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.prefect.io/docs/v3/how-to-guides/deployments/create-deployments\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/v3/how-to-guides/deployments/create-deployments.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.prefect.io/#organization\",\"name\":\"Prefect\",\"url\":\"https://www.prefect.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/prefect-bd373955/2_4m_dDmEdgqK7r9/logos/logo-wordmark-dark.svg?fit=max\u0026auto=format\u0026n=2_4m_dDmEdgqK7r9\u0026q=85\u0026s=076c95a93dbe29192ba9129faefcc878\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.prefect.io/docs#website\",\"name\":\"Prefect\",\"url\":\"https://www.prefect.io/docs\",\"publisher\":{\"@id\":\"https://www.prefect.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.prefect.io/docs/v3/how-to-guides/deployments/create-deployments#webpage\",\"url\":\"https://www.prefect.io/docs/v3/how-to-guides/deployments/create-deployments\",\"name\":\"How to create deployments\",\"description\":\"Learn how to create deployments via the CLI, Python, or Terraform.\",\"dateModified\":\"2026-10-27T20:19:04.321Z\",\"isPartOf\":{\"@id\":\"https://www.prefect.io/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.prefect.io/docs/v3/how-to-guides/deployments/create-deployments#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.prefect.io/docs/v3/how-to-guides/deployments/create-deployments#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Prefect\",\"item\":\"https://www.prefect.io/docs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to create deployments\",\"item\":\"https://www.prefect.io/docs/v3/how-to-guides/deployments/create-deployments\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.prefect.io/docs/v3/how-to-guides/deployments/create-deployments#article\",\"headline\":\"How to create deployments\",\"name\":\"How to create deployments\",\"description\":\"Learn how to create deployments via the CLI, Python, or Terraform.\",\"url\":\"https://www.prefect.io/docs/v3/how-to-guides/deployments/create-deployments\",\"mainEntityOfPage\":{\"@id\":\"https://www.prefect.io/docs/v3/how-to-guides/deployments/create-deployments#webpage\"},\"dateModified\":\"2026-10-27T20:19:04.321Z\",\"keywords\":\"deployment, create, CLI, Python, Terraform, deploy\",\"publisher\":{\"@id\":\"https://www.prefect.io/#organization\"},\"isPartOf\":{\"@id\":\"https://www.prefect.io/docs#website\"}}]}\u003c/script>","siteName":"Prefect","nav":{"global":null,"tabs":[{"tab":"Getting Started","pages":[{"title":"Getting Started","href":"/v3/get-started"}]},{"tab":"Concepts","pages":[{"title":"Concepts","href":"/v3/concepts"}]},{"tab":"How-to Guides","pages":[{"title":"How-to Guides","sidebarTitle":"Overview","icon":"bars","href":"/v3/how-to-guides"},{"group":"Workflows","pages":[{"title":"How to write and run a workflow","sidebarTitle":"Write and run a workflow","href":"/v3/how-to-guides/workflows/write-and-run"},{"title":"How to use assets to track workflow outputs","sidebarTitle":"Use assets to track workflow outputs","href":"/v3/how-to-guides/workflows/assets"},{"title":"How to automatically rerun your workflow when it fails","sidebarTitle":"Automatically rerun a workflow when it fails","href":"/v3/how-to-guides/workflows/retries"},{"title":"How to manually retry a flow run","sidebarTitle":"Manually retry a flow run","href":"/v3/how-to-guides/workflows/retry-flow-runs"},{"title":"How to customize a workflow's metadata","sidebarTitle":"Customize workflow metadata","href":"/v3/how-to-guides/workflows/custom-metadata"},{"title":"How to pass inputs to a workflow","sidebarTitle":"Pass inputs to a workflow","href":"/v3/how-to-guides/workflows/pass-inputs"},{"title":"How to add logging to a workflow","sidebarTitle":"Add logging","href":"/v3/how-to-guides/workflows/add-logging"},{"title":"How to access runtime information","sidebarTitle":"Access runtime information","href":"/v3/how-to-guides/workflows/access-runtime-info"},{"title":"How to run work concurrently","sidebarTitle":"Run work concurrently","href":"/v3/how-to-guides/workflows/run-work-concurrently"},{"title":"How to cache workflow step outputs","sidebarTitle":"Cache workflow step outputs","href":"/v3/how-to-guides/workflows/cache-workflow-steps"},{"title":"How to run background tasks","sidebarTitle":"Run background tasks","href":"/v3/how-to-guides/workflows/run-background-tasks"},{"title":"How to respond to state changes","sidebarTitle":"Respond to state changes","href":"/v3/how-to-guides/workflows/state-change-hooks"},{"title":"How to produce workflow artifacts","sidebarTitle":"Create Artifacts","href":"/v3/how-to-guides/workflows/artifacts"},{"title":"How to test workflows","sidebarTitle":"Test workflows","href":"/v3/how-to-guides/workflows/test-workflows"},{"title":"How to apply global concurrency and rate limits","sidebarTitle":"Apply global concurrency and rate limits","href":"/v3/how-to-guides/workflows/global-concurrency-limits"},{"title":"How to limit concurrent task runs with tags","sidebarTitle":"Limit concurrent task runs with tags","description":"Prevent too many tasks from running simultaneously using tags.","href":"/v3/how-to-guides/workflows/tag-based-concurrency-limits"}]},{"group":"Deployments","pages":[{"title":"How to create deployments","sidebarTitle":"Create Deployments","href":"/v3/how-to-guides/deployments/create-deployments"},{"title":"Trigger ad-hoc deployment runs","description":"Learn how to trigger deployment runs using the Prefect CLI and Python SDK.","href":"/v3/how-to-guides/deployments/run-deployments"},{"title":"How to create schedules","sidebarTitle":"Create Deployment Schedules","href":"/v3/how-to-guides/deployments/create-schedules"},{"title":"Manage Deployment schedules","sidebarTitle":"Manage Deployment schedules","href":"/v3/how-to-guides/deployments/manage-schedules"},{"title":"How to deploy flows with Python","sidebarTitle":"Deploy via Python","href":"/v3/how-to-guides/deployments/deploy-via-python"},{"title":"How to define deployments with YAML","sidebarTitle":"Define deployments with YAML","href":"/v3/how-to-guides/deployments/prefect-yaml"},{"title":"How to retrieve code from storage","sidebarTitle":"Retrieve code from storage","href":"/v3/how-to-guides/deployments/store-flow-code"},{"title":"How to version deployments","sidebarTitle":"Version Deployments","href":"/v3/how-to-guides/deployments/versioning"},{"title":"How to override job variables","sidebarTitle":"Override Job Variables","href":"/v3/how-to-guides/deployments/customize-job-variables"}]},{"group":"Configuration","pages":[{"title":"How to store secrets","sidebarTitle":"Store secrets","href":"/v3/how-to-guides/configuration/store-secrets"},{"title":"How to share configuration between workflows","sidebarTitle":"Share configuration between workflows","href":"/v3/how-to-guides/configuration/variables"},{"title":"How to manage settings","sidebarTitle":"Manage settings","href":"/v3/how-to-guides/configuration/manage-settings"}]},{"group":"Automations","pages":[{"title":"How to create automations","sidebarTitle":"Create Automations","href":"/v3/how-to-guides/automations/creating-automations"},{"title":"Custom notifications","href":"/v3/how-to-guides/automations/custom-notifications"},{"title":"How to create deployment triggers","sidebarTitle":"Create Deployment Triggers","href":"/v3/how-to-guides/automations/creating-deployment-triggers"},{"title":"How to chain deployments with events","sidebarTitle":"Chain Deployments with Events","href":"/v3/how-to-guides/automations/chaining-deployments-with-events"},{"title":"How to access deployment and flow run parameters","sidebarTitle":"Access parameters in templates","href":"/v3/how-to-guides/automations/access-parameters-in-templates"},{"title":"How to pass event payloads to flows","sidebarTitle":"Pass event payloads to flows","href":"/v3/how-to-guides/automations/passing-event-payloads-to-flows"}]},{"group":"Workflow Infrastructure","pages":[{"title":"How to manage work pools","sidebarTitle":"Manage Work Pools","href":"/v3/how-to-guides/deployment_infra/manage-work-pools"},{"title":"How to run flows in local processes","sidebarTitle":"Run Flows in Local Processes","href":"/v3/how-to-guides/deployment_infra/run-flows-in-local-processes"},{"group":"Managed Infrastructure","expanded":false,"pages":[{"title":"How to run flows on Prefect Managed infrastructure","sidebarTitle":"Run flows on Prefect Managed infrastructure","href":"/v3/how-to-guides/deployment_infra/managed"},{"title":"Using cloud workload identity with Prefect Managed work pools","sidebarTitle":"Using cloud workload identity","href":"/v3/how-to-guides/deployment_infra/managed-aws-federated-identity"}]},{"title":"How to run flows on serverless compute","sidebarTitle":"Run flows on serverless compute","href":"/v3/how-to-guides/deployment_infra/serverless"},{"title":"How to run flows in Docker containers","sidebarTitle":"Run flows in Docker containers","href":"/v3/how-to-guides/deployment_infra/docker"},{"title":"How to run flows in a long-lived Docker container","sidebarTitle":"Run flows in a static container","href":"/v3/how-to-guides/deployment_infra/serve-flows-docker"},{"title":"How to run flows on Kubernetes","sidebarTitle":"Run flows on Kubernetes","href":"/v3/how-to-guides/deployment_infra/kubernetes"},{"title":"How to run flows on Modal","sidebarTitle":"Run flows on Modal","href":"/v3/how-to-guides/deployment_infra/modal"},{"title":"How to run flows on Coiled","sidebarTitle":"Run flows on Coiled","href":"/v3/how-to-guides/deployment_infra/coiled"}]},{"group":"Prefect Cloud","pages":[{"title":"How to connect to Prefect Cloud","sidebarTitle":"Connect to Prefect Cloud","href":"/v3/how-to-guides/cloud/connect-to-cloud"},{"group":"Manage accounts","pages":[{"title":"How to manage user accounts","sidebarTitle":"Manage user accounts","href":"/v3/how-to-guides/cloud/manage-users/index"},{"title":"How to manage service accounts","sidebarTitle":"Manage service accounts","href":"/v3/how-to-guides/cloud/manage-users/service-accounts"},{"title":"How to manage teams","sidebarTitle":"Manage teams","href":"/v3/how-to-guides/cloud/manage-users/manage-teams"},{"title":"How to manage account roles","sidebarTitle":"Manage account roles","href":"/v3/how-to-guides/cloud/manage-users/manage-roles"},{"title":"How to manage API keys","sidebarTitle":"Manage API keys","href":"/v3/how-to-guides/cloud/manage-users/api-keys"},{"title":"How to configure single sign-on","sidebarTitle":"Configure single sign-on","href":"/v3/how-to-guides/cloud/manage-users/configure-sso"},{"title":"How to audit Cloud activity","sidebarTitle":"Audit Cloud activity","href":"/v3/how-to-guides/cloud/manage-users/audit-logs"},{"title":"How to manage Access Control Lists (ACLs)","sidebarTitle":"Access Control Lists (ACLs)","href":"/v3/how-to-guides/cloud/manage-users/object-access-control-lists"},{"title":"How to secure access by IP address","sidebarTitle":"Secure access by IP address","href":"/v3/how-to-guides/cloud/manage-users/secure-access-by-ip-address"},{"title":"How to secure access over PrivateLink","sidebarTitle":"Secure access over PrivateLink","href":"/v3/how-to-guides/cloud/manage-users/secure-access-by-private-link"}]},{"title":"How to manage workspaces","sidebarTitle":"Manage Workspaces","href":"/v3/how-to-guides/cloud/workspaces"},{"title":"How to create a webhook","sidebarTitle":"Create a Webhook","href":"/v3/how-to-guides/cloud/create-a-webhook"},{"title":"How to troubleshoot Prefect Cloud","sidebarTitle":"Troubleshoot Prefect Cloud","href":"/v3/how-to-guides/cloud/troubleshoot-cloud"},{"title":"Prefect scope of support","sidebarTitle":"Scope of support","href":"/v3/how-to-guides/cloud/scope-of-support"}]},{"group":"Prefect Self-hosted","pages":[{"title":"How to run a local Prefect server","sidebarTitle":"Run a local Prefect server","href":"/v3/how-to-guides/self-hosted/server-cli"},{"title":"How to run the Prefect server in Docker","sidebarTitle":"Run the Prefect server in Docker","href":"/v3/how-to-guides/self-hosted/server-docker"},{"title":"How to run Prefect on Windows","sidebarTitle":"Run Prefect on Windows","href":"/v3/how-to-guides/self-hosted/server-windows"},{"title":"How to run the Prefect Server via Docker Compose","sidebarTitle":"Run the Prefect Server via Docker Compose","href":"/v3/how-to-guides/self-hosted/docker-compose"}]},{"group":"AI","pages":[{"title":"AI assistants with Prefect MCP","sidebarTitle":"Overview","icon":"robot","href":"/v3/how-to-guides/ai/index"},{"title":"How to use the Prefect MCP server","sidebarTitle":"Use the Prefect MCP server","href":"/v3/how-to-guides/ai/use-prefect-mcp-server"},{"title":"AI log summaries","sidebarTitle":"AI log summaries","href":"/v3/how-to-guides/ai/flow-run-log-summaries"}]},{"group":"Migrate","pages":[{"title":"How to Migrate from Airflow","sidebarTitle":"Migrate from Airflow","href":"/v3/how-to-guides/migrate/airflow"},{"title":"How to upgrade to Prefect 3.0","sidebarTitle":"Upgrade to Prefect 3.0","href":"/v3/how-to-guides/migrate/upgrade-to-prefect-3"},{"title":"How to upgrade from agents to workers","sidebarTitle":"Upgrade from agents to workers","href":"/v3/how-to-guides/migrate/upgrade-agents-to-workers"},{"title":"How to transfer resources between Prefect environments","sidebarTitle":"Transfer resources between environments","href":"/v3/how-to-guides/migrate/transfer-resources"}]}]},{"tab":"Advanced","pages":[{"title":"Advanced","href":"/v3/advanced"}]},{"tab":"Examples","pages":[{"title":"Examples","href":"/v3/examples"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/integrations"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/v3/api-ref"}]},{"tab":"Contribute","pages":[{"title":"Contribute","href":"/contribute"}]},{"tab":"Release Notes","pages":[{"title":"Release Notes","href":"/v3/release-notes"}]}]},"basePath":"","title":"How to create deployments - Prefect","buildId":"dpl_ATnXPMW25DMPUr9VBw6kL6MfBt6T","deploymentId":"dpl_ATnXPMW25DMPUr9VBw6kL6MfBt6T","dynamics":[],"chunks":[]}