Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit 0fc1895

Browse files
author
sfomuseumbot
committed
update to allow aws://?region=us-east-1 style URIs
1 parent 549bac6 commit 0fc1895

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ func NewConfig(ctx context.Context, uri string) (aws.Config, error) {
6161

6262
creds := q.Get("credentials")
6363

64+
if region == "" {
65+
region = q.Get("region")
66+
}
67+
6468
cfg, err := NewConfigWithCredentialsString(ctx, creds)
6569

6670
if err != nil {

config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ package auth
22

33
import (
44
"context"
5-
_ "fmt"
65
"testing"
76
)
87

98
func TestNewConfig(t *testing.T) {
109

1110
uris := []string{
1211
"aws://us-east-1?credentials=anon:",
12+
"aws://?region=us-east-1&credentials=anon:",
1313
}
1414

1515
ctx := context.Background()

0 commit comments

Comments
 (0)