diff --git a/provider/ecs/ecs.go b/provider/ecs/ecs.go index c3668e94e..89b028458 100644 --- a/provider/ecs/ecs.go +++ b/provider/ecs/ecs.go @@ -309,6 +309,11 @@ func (p *Provider) listInstances(ctx context.Context, client *awsClient) ([]ecsI state: aws.StringValue(task.LastStatus), } } else { + if containerInstance == nil { + log.Errorf("Unable to find container instance information for %s", aws.StringValue(container.Name)) + continue + } + var ports []portMapping for _, mapping := range container.NetworkBindings { if mapping != nil {