Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions amazon.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func NewAmazonS3Backend(bucket string, prefix string, region string, endpoint st
}
client = &http.Client{Transport: tr}
}
service := s3.New(session.New(), &aws.Config{
service := s3.New(session.Must(session.NewSession()), &aws.Config{
HTTPClient: client,
Region: aws.String(region),
Endpoint: aws.String(endpoint),
Expand Down Expand Up @@ -84,7 +84,7 @@ func NewAmazonS3BackendWithOptions(bucket string, prefix string, region string,
if options != nil && options.S3ForcePathStyle != nil {
s3ForcePathStyle = *options.S3ForcePathStyle
}
service := s3.New(session.New(), &aws.Config{
service := s3.New(session.Must(session.NewSession()), &aws.Config{
HTTPClient: client,
Region: aws.String(region),
Endpoint: aws.String(endpoint),
Expand All @@ -111,7 +111,7 @@ func NewAmazonS3BackendWithCredentials(bucket string, prefix string, region stri
}
client = &http.Client{Transport: tr}
}
service := s3.New(session.New(), &aws.Config{
service := s3.New(session.Must(session.NewSession()), &aws.Config{
HTTPClient: client,
Credentials: credentials,
Region: aws.String(region),
Expand Down
Loading