Hi. Does anybody had any issues with Prefect 1.x E...
# ask-community
a
Hi. Does anybody had any issues with Prefect 1.x ECS deployment ? Regarding the flow register not having the Fargate machine you requested ? I registered 16vCPU and have in the task definition only a 2vCPU machine. Spoke with AWS support but it was not helpful and our AWS Account does have a vCPU limit at 2000. So enough bandwidth.
m
Hey @Andrei Tulbure Would you be able to provide the output you're seeing when you're attempting to register the flow?
a
@Mason Menges no issues with registering. It registers and it works. It`s just that in the task definition the machine appears as a 2vCPU one, while I Register it as a 16vCPU one. Hence, which output do you need ? The one in the PRefect UI after it starts running? Sorry but I am kind of a newbie to prefect
z
Depending on the mode (Fargate, EC2), we request the CPU at the task run level instead of the task definition level.
Copy code
In [5]: print(ECSTask(command=["prefect", "version"], cpu=16).preview())
---
# Task definition
containerDefinitions:
- image: prefecthq/prefect:dev-python3.8
  name: prefect
cpu: '16'
family: prefect
memory: '2048'
networkMode: awsvpc
requiresCompatibilities:
- FARGATE

---
# Task run request
launchType: FARGATE
networkConfiguration:
  awsvpcConfiguration:
    assignPublicIp: ENABLED
    subnets: <loaded from the default VPC at runtime>
overrides:
  containerOverrides:
  - command:
    - prefect
    - version
    cpu: 16
    environment: []
    name: prefect
  cpu: '16'
tags: []
taskDefinition: <registered at runtime>
a
@Zanie so that means that even though the Task def shows a 2 vCPU machine, if we register it with 16 vCPUs we are using the underlying 16vCPU machinie right ?
z
I believe that it will set it to 16vCPU at runtime. Can you share the output of a preview?
a
sorry, did not get a notification. I think you are right, it will be set to 16vCPU. What exactly do you mean by preview?
z
In my comment above I used the
.preview()
method to generate a preview of the task definition we’ll use 🙂