So I have a Fargate ECS cluster, but when I try to...
# ask-community
j
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
Can I see the
ECSRun
you have? How do you know this refers to the 4096?
j
Copy code
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
yeah was about to say it’s using the default memory specified by Prefect here
j
Thanks again. I think I'm getting a handle on how Prefect works, architecturally, finally.
k
Nice to hear!