Skip to content

Commit

Permalink
aws/all: Change the default for AWS URLs from V1 to V2.
Browse files Browse the repository at this point in the history
  • Loading branch information
vangent committed Aug 13, 2024
1 parent d245f10 commit cde91a4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,14 @@ func NewSessionFromURLParams(q url.Values) (*session.Session, url.Values, error)
//
// "awssdk=v1" will force V1.
// "awssdk=v2" will force V2.
// No "awssdk" parameter (or any other value) will return the default, currently V1.
// Note that the default may change in the future.
// No "awssdk" parameter (or any other value) will return the default, currently V2.
func UseV2(q url.Values) bool {
if values, ok := q["awssdk"]; ok {
if values[0] == "v2" || values[0] == "V2" {
return true
if values[0] == "v1" || values[0] == "V1" {
return false
}
}
return false
return true
}

// NewDefaultV2Config returns a aws.Config for AWS SDK v2, using the default options.
Expand Down

0 comments on commit cde91a4

Please sign in to comment.