<@ULVA73B9P> Can you show me an example of an ECS ...
# ask-marvin
m
@Marvin Can you show me an example of an ECS based Prefect deployment in prefect.yaml?
m
ECS, you say? Grug curious. 🧐 Which version of Prefect you using? Tell Grug, so Grug can dig the right hole in the ground for your answer.
m
@Marvin Prefect 2
m
Alright, Grug found some useful holes! 🕳️ Here's an example of an ECS-based deployment configuration in
prefect.yaml
for Prefect 2.x:
Copy code
yaml
name: ecs-flow
version: 1.0
description: A deployment using ECS to run flow
work_pool:
  type: ecs
  base_job_template:
    cluster: "YOUR_ECS_CLUSTER_NAME"
    taskDefinition: "YOUR_TASK_DEFINITION_NAME"
    launchType: "FARGATE"
    networkConfiguration:
      awsvpcConfiguration:
        subnets: 
          - "YOUR_SUBNET_ID"
        assignPublicIp: "ENABLED"

infra_overrides:
  env:
    PREFECT__CLOUD__API: "<https://api.prefect.io>"
    PREFECT__CLOUD__AUTH_TOKEN: "YOUR_PREFECT_CLOUD_API_KEY"
    ADDITIONAL_ENV_VAR: "value"

tags: 
  - "example"
  - "ecs"
For more detailed information on ECS deployments with Prefect, you can check the documentation here. Hope this helps, happy deploying! 🚀