Skip to content

Commit

Permalink
Merge pull request #97 from hortonworks/aws_retry
Browse files Browse the repository at this point in the history
Add retry for AWS service calls
  • Loading branch information
Bajzathd authored May 23, 2023
2 parents b6738e7 + 6439ae1 commit 9fe334b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const (
TYPE_NATIVE = "Native"
TYPE_CF = "CloudFormation"
CF_TAG = "aws:cloudformation:stack-id"
MAX_RETRIES = 5

METADATA_TYPE = "type"
METADATA_LOAD_BALANCERS = "loadBalancers"
Expand Down Expand Up @@ -1885,7 +1886,11 @@ func newSession(configure func(*aws.Config)) (*session.Session, error) {
Transport: NewThrottledTransport(rateLimiter, &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
})}
config := aws.Config{HTTPClient: httpClient}
maxRetries := MAX_RETRIES
config := aws.Config{
HTTPClient: httpClient,
MaxRetries: &maxRetries,
}
if configure != nil {
configure(&config)
}
Expand Down

0 comments on commit 9fe334b

Please sign in to comment.