Hello - When using ECS/Fargate is there a way to s...
# ask-community
r
Hello - When using ECS/Fargate is there a way to set the dnsServers on the task definition without providing a custom task definition?
k
Hi @Robert Bastian! Maybe you can use the
run_task_kwargs
of ECSRun? Doc
r
It doesn’t look like “dnsServers” is a parameter you can pass to ECS.client.run_task.
k
That would be the only route to set something without the custom task definition so if it can’t be done there I don’t think there’s another way unfortuntately
r
OK, so it looks like this isn’t possible: Check:
Copy code
botocore.errorfactory.ClientException: An error occurred (ClientException) when calling the RegisterTaskDefinition operation: DNS servers are not supported on container when networkMode=awsvpc.
and, mate:
Copy code
For Amazon ECS tasks on Fargate, the awsvpc network mode is required.
😩 1