Skip to content

Commit

Permalink
Merge pull request #424 from chronosphereio/pwhelan-fix-sc-107258
Browse files Browse the repository at this point in the history
[sc-107258] fix: resolve the endpoint correctly when setting the s3 region.
  • Loading branch information
pwhelan committed Sep 5, 2024
2 parents dec7e3e + 008a421 commit 43513b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ func (r *resolverV2) ResolveEndpoint(ctx context.Context, params s3.EndpointPara
smithyendpoints.Endpoint,
error,
) {
params.Endpoint = aws.String(r.BaseEndpoint)
if r.Region != "" {
params.Region = aws.String(r.Region)
} else {
params.Endpoint = aws.String(r.BaseEndpoint)
}
return s3.NewDefaultEndpointResolverV2().ResolveEndpoint(ctx, params)
}
Expand Down

0 comments on commit 43513b5

Please sign in to comment.