fix(common): add missing region and remove session token requirement

Signed-off-by: Mike Nguyen <hey@mike.ee>
This commit is contained in:
Mike Nguyen 2025-07-25 13:57:39 +01:00
parent 29620e4e9c
commit 5f64a8f67b
No known key found for this signature in database
2 changed files with 8 additions and 1 deletions

View File

@ -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)

View File

@ -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,