Skip to content

Commit

Permalink
set max retries for AWS (#158)
Browse files Browse the repository at this point in the history
* set max retries for AWS

* use config in session
  • Loading branch information
mrIncompetent authored Apr 12, 2018
1 parent 29a1af2 commit b60d28a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/cloudprovider/provider/aws/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ const (
defaultRoleName = "kubernetes-v1"
defaultInstanceProfileName = "kubernetes-v1"
defaultSecurityGroupName = "kubernetes-v1"

maxRetries = 100
)

var (
Expand Down Expand Up @@ -243,7 +245,7 @@ func getSession(id, secret, token, region string) (*session.Session, error) {
config := aws.NewConfig()
config = config.WithRegion(region)
config = config.WithCredentials(credentials.NewStaticCredentials(id, secret, token))
config = config.WithMaxRetries(3)
config = config.WithMaxRetries(maxRetries)
return session.NewSession(config)
}

Expand Down

0 comments on commit b60d28a

Please sign in to comment.