Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Support the AWS_REGION env var #542

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
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: 4 additions & 2 deletions pkg/storage/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,10 @@ func NewS3Storage( // revive:disable-line:flag-parameter
qs := *backend
awsConfig := aws.NewConfig().
WithMaxRetries(maxRetries).
WithS3ForcePathStyle(qs.ForcePathStyle).
WithRegion(qs.Region)
WithS3ForcePathStyle(qs.ForcePathStyle)
if qs.Region != "" {
awsConfig.WithRegion(qs.Region)
}
if qs.Endpoint != "" {
awsConfig.WithEndpoint(qs.Endpoint)
}
Expand Down