diff --git a/aws/config.go b/aws/config.go index a6e4af6b466..757b1704e86 100644 --- a/aws/config.go +++ b/aws/config.go @@ -399,6 +399,20 @@ func (c *Config) Client() (interface{}, error) { } }) + // Workaround for https://github.com/aws/aws-sdk-go/issues/1472 + client.appautoscalingconn.Handlers.Retry.PushBack(func(r *request.Request) { + if !strings.HasPrefix(r.Operation.Name, "Describe") && !strings.HasPrefix(r.Operation.Name, "List") { + return + } + err, ok := r.Error.(awserr.Error) + if !ok || err == nil { + return + } + if err.Code() == applicationautoscaling.ErrCodeFailedResourceAccessException { + r.Retryable = aws.Bool(true) + } + }) + return &client, nil }