Skip to content

Commit

Permalink
core: retry on "NoCredentialProviders" aws error
Browse files Browse the repository at this point in the history
  • Loading branch information
igungor committed Feb 19, 2020
1 parent 7e1c594 commit ad3d4f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func IsRetryableError(err error) (code string, retryable bool) {

errCode := awsErr.Code()
switch errCode {
case "SlowDown", "SerializationError", "RequestError", sdkPanicErrCode:
case "SlowDown", "SerializationError", "RequestError", sdkPanicErrCode, "NoCredentialProviders":
code = errCode
return
}
Expand Down
4 changes: 3 additions & 1 deletion core/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ func NewAwsSession(maxRetries int, endpointURL string, region string, noVerifySS
return session.NewSessionWithOptions(session.Options{Config: *c, SharedConfigState: useSharedConfig})
}

awsCfg := aws.NewConfig().WithMaxRetries(maxRetries) //.WithLogLevel(aws.LogDebug))
awsCfg := aws.NewConfig().
WithMaxRetries(maxRetries).
WithCredentialsChainVerboseErrors(true)

if endpointURL != "" {
endpoint, err := url.Parse(endpointURL)
Expand Down

0 comments on commit ad3d4f9

Please sign in to comment.