Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
pondzix committed Feb 2, 2025
1 parent 10b43af commit cf5d414
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.1
3.2.0-rc1
2 changes: 1 addition & 1 deletion cmd/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ package cmd

const (
// AppVersion is the current version of the app
AppVersion = "3.1.1"
AppVersion = "3.2.0-rc1"

// AppName is the name of the application to use in logging / places that require the artifact
AppName = "snowbridge"
Expand Down
13 changes: 11 additions & 2 deletions pkg/common/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"crypto/x509"
"fmt"
"hash"
"net/http"
"os"
"time"

Expand All @@ -33,11 +34,18 @@ import (
// using the standard auth flow. We also have the ability to pass a role ARN
// to allow for roles to be assumed in cross-account access flows.
func GetAWSSession(region string, roleARN string, endpoint string) (sess *session.Session, cfg *aws.Config, accountID *string, err error) {
transport := http.DefaultTransport.(*http.Transport).Clone()
transport.MaxIdleConnsPerHost = transport.MaxIdleConns
httpClient := &http.Client{
Transport: transport,
}

sess = session.Must(session.NewSessionWithOptions(session.Options{
SharedConfigState: session.SharedConfigEnable,
Config: aws.Config{
Region: aws.String(region),
Endpoint: aws.String(endpoint),
Region: aws.String(region),
Endpoint: aws.String(endpoint),
HTTPClient: httpClient,
},
}))

Expand All @@ -46,6 +54,7 @@ func GetAWSSession(region string, roleARN string, endpoint string) (sess *sessio
cfg = &aws.Config{
Credentials: creds,
Region: aws.String(region),
HTTPClient: httpClient,
}
}

Expand Down

0 comments on commit cf5d414

Please sign in to comment.