diff --git a/backend/ec2.go b/backend/ec2.go index e3ed7d116..028d175c1 100644 --- a/backend/ec2.go +++ b/backend/ec2.go @@ -504,7 +504,7 @@ func (p *ec2Provider) Start(ctx gocontext.Context, startAttributes *StartAttribu } instances, lastErr = svc.DescribeInstances(describeInstancesInput) - if instances != nil { + if instances != nil && len(instances.Reservations) > 0 && len(instances.Reservations[0].Instances) > 0 { instance := instances.Reservations[0].Instances[0] address := *instance.PrivateIpAddress if instance.PublicIpAddress != nil && p.publicIPConnect { @@ -523,6 +523,9 @@ func (p *ec2Provider) Start(ctx gocontext.Context, startAttributes *StartAttribu instanceChan <- nil return } + if reservation.Instances[0].InstanceId != nil { + logger.Debugf("instance %s is not ready", *reservation.Instances[0].InstanceId) + } time.Sleep(500 * time.Millisecond) } }()