Hi I am passing a networkConfiguration yaml file a...
# ask-community
r
Hi I am passing a networkConfiguration yaml file at agent start, yet running into this botocore error on flow execution: I'm unable to start an ecs agent w/out a path to networkConfig (i get an infer default config error) however flows are failing to run. any insight here? thanks botocore.exceptions.ParamValidationError: Parameter validation failed: Unknown parameter in input: "networkConfiguration", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAccelerators
s
can you share what your yml file looks like?
r
when we specify our networkConfiguration file-- Because we don't have a default networkconfig, prefect is failing to infer a default. When we pass the netConfig.yaml file at agent start --run-task-kwargs, the agent starts normally but is failing @ register_task_definitions()
networkConfiguration:   awsvpcConfiguration:     assignPublicIp: 'DISABLED'     subnets:       - subnet-****** securityGroups: - sg-************* - sg-*************
@Sean Talia
s
that's odd, that's exactly how my file is structured
are you working with the version of boto that's installed with prefect?
r
yes
which version are you using?
s
Copy code
boto3==1.17.15
botocore==1.20.15
i unfortunately have to sign off for the day but if you're still having issues tomorrow i can possibly try to help diagnose, it seems like it's something quite petty though 😎
r
@Darren
m
Hello Renzo! It looks like you are trying to add
networkConfiguration
to task definition, which is not correct, you need to provide it as a parameter of AWS service
r
@Mariia Kerimova how can I pass network configuration upon agent start?
failing to do so results in a 'failed to infer default network configuration'
m
This PR is not merged yet, but I provide an example of creating a service for the agent https://github.com/PrefectHQ/prefect/pull/4302/files
You can pass network configuration when you create a service. Do you use default VPC or did you create a new one? In any case, you can follow that example, just update your token, subnet, security group. Let me know if you'll have any questions
r
@Mariia Kerimova we don't have a default VPC, so we have to pass vpcConfig to include subnets and sec groups
Why is it that I have to create a task definition and service when prefect fails to infer a default vpc? I have a default vpc config set on my personal aws acct and everything works perfectly
m
Currently the agent can infer the default VPC, but not custom vpc. I'm talking with one of our engineers to expand this behavior to custom vpcs too 👍
r
@Mariia Kerimova I added to the src code and I'm able to set the net config w/out any issues. I'm happy to submit a MR, lmk.
m
sounds awesome! Yes, we appreciate contributions a lot! 🙂
r
is there an issue assigned to this?
m
There should be an issue as I remember, but you can open PR without referencing the issue for now. I’m going to find it in a bit, and mention it in your PR or post it here if you would prefer that
r
@Mariia Kerimova Update ~ ECS Fargate Agent: +network configuration param #4323
m
Fabulous, thank you so much! We are going to review it shortly! @Jim Crist-Harif
👍 1