I’d like to be able to use the `run_task_kwargs_pa...
# prefect-community
I’d like to be able to use the
prefect agent ecs start
as it’s not picking up my VPC (not the default one) but the docs don’t say what format
should be in. Saw this issue here, but hasn’t been an update recently https://prefect-community.slack.com/archives/CL09KU1K7/p1653756981241529
I’ve also tried using the
option but it seems to just ignore that
Hey Jonathan! You should be able to pass in a yaml file to the cli command using this flag. https://docs-v1.prefect.io/api/latest/cli/agent.html#ecs-start
Copy code
Thanks Rob! What should be in that yaml file though?
That yaml file will be variables that are passed to the ECS run_task function. I would recommend setting the networkConfiguration (in yaml format) section that can be found in the AWS documentation and passing it in through the run-task-kwargs argument. You can also specify the task definition template that the agent can use to spin up new ECS tasks using the
option https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html
Thanks Rob!
👍 1
For anyone coming across this in the future, we had to tweak the case for the keys in the yaml file to get it to work: https://github.com/PrefectHQ/prefect/issues/5379