diff --git a/provider/ecs/ecs.go b/provider/ecs/ecs.go index 6076df7a3..c3668e94e 100644 --- a/provider/ecs/ecs.go +++ b/provider/ecs/ecs.go @@ -293,7 +293,7 @@ func (p *Provider) listInstances(ctx context.Context, client *awsClient) ([]ecsI } var mach *machine - if aws.StringValue(task.LaunchType) == ecs.LaunchTypeFargate { + if len(task.Attachments) != 0 { var ports []portMapping for _, mapping := range containerDefinition.PortMappings { if mapping != nil {