https://prefect.io logo
Title
j

Jason

04/14/2022, 7:16 PM
So I have a Fargate ECS cluster, but when I try to scale up the cpu count with ECSRun() I get:
[14 April 2022 2:14pm]: An error occurred (InvalidParameterException) when calling the RunTask operation: No Fargate configuration exists for given values.
. The weird thing is that 4096 appears to be a valid entry: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html. Is it possible I screwed up the definition of my fargate cluster?
k

Kevin Kho

04/14/2022, 7:17 PM
Can I see the
ECSRun
you have? How do you know this refers to the 4096?
j

Jason

04/14/2022, 7:20 PM
ecs_run = ECSRun(
    labels=["prod"],
    run_task_kwargs={"cluster": "{edited}-prod-platform-prefect"},
    execution_role_arn="arn:aws:iam::{edited}:role/ecsTaskExecutionRole",
    task_role_arn="arn:aws:iam::{edited}:role/prefectTaskRole",
    cpu=4096,
)
Oh interesting. Memory must be explicitly set within the range, Kevin. So if memory=None, it must go for the lowest amount which isn't a valid execution for FARGATE.
k

Kevin Kho

04/14/2022, 7:26 PM
yeah was about to say it’s using the default memory specified by Prefect here
j

Jason

04/14/2022, 7:26 PM
Thanks again. I think I'm getting a handle on how Prefect works, architecturally, finally.
k

Kevin Kho

04/14/2022, 7:28 PM
Nice to hear!