Skip to content

Commit

Permalink
expose ProcessProviderOptions when creating a session
Browse files Browse the repository at this point in the history
  • Loading branch information
atishpatel committed Jun 14, 2023
1 parent 8962904 commit 17ee3e0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion aws/session/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ type CredentialsProviderOptions struct {
// WebIdentityRoleProviderOptions configures a WebIdentityRoleProvider,
// such as setting its ExpiryWindow.
WebIdentityRoleProviderOptions func(*stscreds.WebIdentityRoleProvider)

// ProcessProviderOptions configures a ProcessProvider,
// such as setting its Timeout.
ProcessProviderOptions func(*processcreds.ProcessProvider)
}

func resolveCredentials(cfg *aws.Config,
Expand Down Expand Up @@ -134,7 +138,7 @@ func resolveCredsFromProfile(cfg *aws.Config,

case len(sharedCfg.CredentialProcess) != 0:
// Get credentials from CredentialProcess
creds = processcreds.NewCredentials(sharedCfg.CredentialProcess)
creds = processcreds.NewCredentials(sharedCfg.CredentialProcess, sessOpts.CredentialsProviderOptions.ProcessProviderOptions)

default:
// Fallback to default credentials provider, include mock errors for
Expand Down

0 comments on commit 17ee3e0

Please sign in to comment.