fix(common): add missing region and remove session token requirement
Signed-off-by: Mike Nguyen <hey@mike.ee>
This commit is contained in:
parent
29620e4e9c
commit
5f64a8f67b
|
@ -49,7 +49,7 @@ func newAuthStatic(ctx context.Context, opts Options, configOpts []func(*config.
|
|||
}
|
||||
|
||||
switch {
|
||||
case static.AccessKey != "" && static.SecretKey != "" && static.SessionToken != "":
|
||||
case static.AccessKey != "" && static.SecretKey != "":
|
||||
static.ProviderType = StaticProviderTypeStatic
|
||||
static.CredentialProvider = credentials.NewStaticCredentialsProvider(opts.AccessKey, opts.SecretKey,
|
||||
opts.SessionToken)
|
||||
|
|
|
@ -54,6 +54,13 @@ func NewConfig(ctx context.Context, authOptions auth.Options, opts ...ConfigOpti
|
|||
)
|
||||
}
|
||||
|
||||
if authOptions.Region != "" {
|
||||
configLoadOptions = append(
|
||||
configLoadOptions,
|
||||
config.WithRegion(authOptions.Region),
|
||||
)
|
||||
}
|
||||
|
||||
if options.HTTPClient != nil {
|
||||
configLoadOptions = append(
|
||||
configLoadOptions,
|
||||
|
|
Loading…
Reference in New Issue