func (d DefaultRetryer) ShouldRetry(r *request.Request) bool {
	if r.Retryable != nil {
		return *r.Retryable
	}
	if r.HTTPResponse.StatusCode >= 500 && r.HTTPResponse.StatusCode != 501 {
		return true
	}
	return r.IsErrorRetryable() || d.shouldThrottle(r)
}
ShouldRetry returns true if the request should be retried.
package client
import (
	"strconv"
	"time"
	"github.com/aws/aws-sdk-go/aws/request"
	"github.com/aws/aws-sdk-go/internal/sdkrand"
)
type DefaultRetryer struct {
	NumMaxRetries int
}
func (d DefaultRetryer) MaxRetries() int {
	return d.NumMaxRetries
}
func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration {
	minTime := 30
	throttle := d.shouldThrottle(r)
	if throttle {
		if delay, ok := getRetryDelay(r); ok {
			return delay
		}
		minTime = 500
	}
	retryCount := r.RetryCount
	if throttle && retryCount > 8 {
		retryCount = 8
	} else if retryCount > 13 {
		retryCount = 13
	}
	delay := (1 << uint(retryCount)) * (sdkrand.SeededRand.Intn(minTime) + minTime)
	return time.Duration(delay) * time.Millisecond
}