diff --git a/builtin/providers/aws/config.go b/builtin/providers/aws/config.go index dd1149b910f4..91e571c1c655 100644 --- a/builtin/providers/aws/config.go +++ b/builtin/providers/aws/config.go @@ -382,6 +382,20 @@ func (c *Config) Client() (interface{}, error) { client.wafconn = waf.New(sess) client.wafregionalconn = wafregional.New(sess) + // Workaround for https://github.com/aws/aws-sdk-go/issues/1376 + client.kinesisconn.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() == kinesis.ErrCodeLimitExceededException { + r.Retryable = aws.Bool(true) + } + }) + return &client, nil }