diff --git a/autoscaling.go b/autoscaling.go index 16f1939..6b62817 100644 --- a/autoscaling.go +++ b/autoscaling.go @@ -364,6 +364,11 @@ func (a *Autoscaling) getAutoscalingInstanceHealth(autoScalingGroupName string) autoscalingLogger.Errorf(err.Error()) } } + + if len(instanceIdsSlice) > batchSize { + autoscalingLogger.Infof("Sleeping 10s to avoid ratelimiting (instance size: %d)", len(instanceIdsSlice)) + time.Sleep(10 * time.Second) + } } // get IPs