https://prefect.io logo
Title
a

Adam Roderick

04/14/2020, 12:27 PM
Does anyone know why an Fargate agent would immediately fail when a flow run is triggered, with the message "An error occurred (InvalidParameterException) when calling the RegisterTaskDefinition operation: Invalid 'cpu' setting for task."
j

josh

04/14/2020, 12:28 PM
Hey @Adam Roderick what are you specifying for the
cpu
?
a

Adam Roderick

04/14/2020, 12:32 PM
1024
j

josh

04/14/2020, 12:32 PM
Are you specifying it as a string or integer?
a

Adam Roderick

04/14/2020, 12:34 PM
it shows as a string
in quotes
j

josh

04/14/2020, 12:34 PM
Side question: are you also specifying a memory amount?
a

Adam Roderick

04/14/2020, 12:35 PM
yes 8192
I changed them to integers and it looks like the ECS Task is spinning up this time.
That is farther than I made it before
j

josh

04/14/2020, 12:43 PM
How are you running the agent? CLI, FargateAgent.start(), etc.? I just completed a run using strings to verify it was working
a

Adam Roderick

04/14/2020, 12:43 PM
I had upgraded the agent to prefect 10.1 from 0.7.1
j

josh

04/14/2020, 12:43 PM
Oh big upgrade!
a

Adam Roderick

04/14/2020, 12:44 PM
Heh yes probably a no no
Here is the command that starts the container in ECS
j

josh

04/14/2020, 12:44 PM
Yeah there was definitely some configuration change between those versions 😅
a

Adam Roderick

04/14/2020, 12:59 PM
Yeah. I migrated our setup to use the Dockerfile method to register the flows. Previously we were using the base Docker image method
I upgraded our prefect dependencies and didn't think about how much change there must have been regarding the agent
In summary, changing the CPU and Memory values to integers resolved this
Thank you!