Anyone had success running an ECSTask on AWS Works...
# prefect-server
j
Anyone had success running an ECSTask on AWS Workspaces? There appears to be a bug where docker's default "bridge" networking, when run on AWS Workspaces, does not allow any network traffic to/from the outside world. Which means that when your Dockerfile gets to a line like
RUN pip install -r requirements.txt
that requires network it just hangs.
k
So you already specify
networkMode: bridge
for the AWS ECS task and it doesn’t work?
j
It runs fine on ECS
But so far have not been able to register the flow from AWS Workspaces, because it hangs when attempting to build the required docker images on AWS Workspaces.
We can register the flow fine from other architectures, like generic EC2. But not from AWS Workspaces
I'm not sure whether our ECS task has anything specific regarding networkMode
k
Ah ok i personally havent seen this stack
j
Our workaround for getting normal docker commands like
docker run -it python:3.9 bash
to run on workspaces (with network) is to use the
--network=host
option.
Copy code
docker run -it --network=host python:3.9 bash
But I'm not sure if there are any arguments for
ECSRun
that would add
--network=host
to the
docker build ...
commands as it is building the docker image.
k
It sounds like it would be this right to bind container ports to the EC2 host? I can’t see anywhere else it would go on the ECS run task client
Ohhh maybe it’s this ?
j
Those are related, but I'm stuck on building the docker image, not on deploying the doctor image or running it on ECS.
I have already submitted a support request to AWS. In my opinion this is a bug in AWS workspaces
It turns out it was a DNS issue, and this stackoverflow page shows how to fix it.