https://prefect.io logo
p

Pedro Machado

07/25/2023, 2:30 PM
Hi everyone. I am running my flows in an ECS cluster. I need to run a flow that uses a specific security group. I found the
task_customizations
for ECSTask but I could not use that in my
prefect.yaml
I tried under
job_variables
How can I specify a security group/subnet for my flow/deployment?
m

Mitch

08/02/2023, 9:20 PM
Hey @Pedro Machado Did you solve this? I"m looking for the same solution
p

Pedro Machado

08/02/2023, 9:53 PM
Hi Mitch. Yes, I had to go to the ecs worker pool on Prefect Cloud and edit the json under the "Base Job Template" Advanced tab. I added a section right after
taskDefinition
Copy code
"networkConfiguration": {
        "awsvpcConfiguration": {
          "subnets": [
            "subnet-xxxxxxxx"
          ],
          "assignPublicIp": "ENABLED",
          "securityGroups": [
            "sg-xxxxxxx",
            "sg-xxxxxxx"
          ]
        }
      }
the top key is
job_configuration
m

Mitch

08/02/2023, 10:11 PM
Got it! I’ll give it a shot
Thanks!
y

Yaron Levi

09/22/2023, 11:40 AM
@Pedro Machado Hi 👋
This is the place where you’ve added this?
CleanShot 2023-09-22 at 14.41.26@2x.jpg
👍 1
p

Pedro Machado

09/22/2023, 1:38 PM
Hi @Yaron Levi I am not on the computer now but that looks correct.