diff --git a/pkg/provider/ecs/ecs.go b/pkg/provider/ecs/ecs.go index e2edfbbc7f..2a970f81cb 100644 --- a/pkg/provider/ecs/ecs.go +++ b/pkg/provider/ecs/ecs.go @@ -314,7 +314,7 @@ func (p *Provider) listInstances(ctx context.Context, client *awsClient) ([]ecsI } var mach *machine - if len(task.Attachments) != 0 { + if aws.StringValue(taskDef.NetworkMode) == "awsvpc" && len(task.Attachments) != 0 { if len(container.NetworkInterfaces) == 0 { logger.Errorf("Skip container %s: no network interfaces", aws.StringValue(container.Name)) continue