Skip to content

Commit

Permalink
Fixed s3 region env variable providing
Browse files Browse the repository at this point in the history
Fixed region value provided via environment variable `AWS_REGION` for s3 storage

Found when investigated #36
  • Loading branch information
wwoytenko committed Mar 27, 2024
1 parent 61ea77c commit 8fd18cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/storages/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ func NewStorage(ctx context.Context, cfg *Config, logLevel string) (*Storage, er
if cfg.Endpoint != "" {
awsCfg.WithEndpoint(cfg.Endpoint)
}
awsCfg.WithRegion(cfg.Region)

if cfg.Region != "" {
awsCfg.WithRegion(cfg.Region)
}

if cfg.CertFile != "" {
file, err := os.Open(cfg.CertFile)
Expand Down

0 comments on commit 8fd18cc

Please sign in to comment.