Hi there, I have a Prefect Server running, and my ...
# ask-community
p
Hi there, I have a Prefect Server running, and my goal is to have an ECS Worker running, which is running tasks on Fargate. I created an ECS Cluster and spun up an ECS Worker in there. I would like to run all tasks that this worker creates to run in one specific private subnet, which has a necessary NAT Gateway setup to be able to communicate with on-prem services we need. I could configure the Worker to run in the private subnet. However, I cannot seem to get the tasks to run in this subnet, they are always run in a random one. In the Worker settings page there is a
vpc_id
setting, but nothing for subnets. I tried adding the following snippet in the advanced section under
task_run_request
, but it does not seem to work. What am I doing wrong?
Copy code
"networkConfiguration": {
        "awsvpcConfiguration": {
          "Subnets": [
            "subnet-xxxx"
          ],
          "AssignPublicIp": "False",
          "SecurityGroups": [
            "sg-xxxxx"
          ]
        }
      },