ecs-nginx-proxy icon indicating copy to clipboard operation
ecs-nginx-proxy copied to clipboard

Fargate Support

Open backtrackbaba opened this issue 6 years ago • 3 comments

Would this ECS nginx proxy work with Fargate too? I am trying to implement it on Fargate but I'm running into problems getting it started

backtrackbaba avatar Dec 18 '17 05:12 backtrackbaba

Any error messages? I haven't used Fargate, but it says it's based on ECS. Will check the docs when I find some time.

codesuki avatar Dec 20 '17 00:12 codesuki

Hi @codesuki, I'm trying to get this running with fargate as well. Everything is running, but the nginx proxy container logs InvalidParameterException: Container instance cannot be empty.. I've attached a role to my task with the permission: AmazonEC2ContainerServiceFullAccess

davidworkman9 avatar Dec 28 '17 16:12 davidworkman9

@Digging into this, it appears that ecs.listContainerInstances returns an empty array when the cluster is backed by fargate instead of EC2.

EDIT: Tried running this in a cluster with a mix of fargate and EC2 services, still doesn't work but I get a different error message: container has no network bindings. skipping. It does correctly list containers running in EC2 mode in the output file.

More information - The above error message is because fargate seems to have a networkInterface instead of a networkBindings. Looks like the only need to extract that information is to get the port it's running on, I hardcoded port 80 and now I'm running into the fact that there isn't a ContainerInstanceArn on the task.

davidworkman9 avatar Dec 28 '17 17:12 davidworkman9