From ebbc5bc0a7185048d84cb04891dcd400b7ba66d3 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Mon, 13 Jan 2025 17:16:40 +0300 Subject: [PATCH] [#192] s3: Fix deprecated endpoint resolver Signed-off-by: Denis Kirillov --- internal/s3/s3.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/internal/s3/s3.go b/internal/s3/s3.go index e430a63..64a5cd8 100644 --- a/internal/s3/s3.go +++ b/internal/s3/s3.go @@ -53,17 +53,8 @@ func (s *S3) Exports() modules.Exports { } func (s *S3) Connect(endpoint string, params map[string]string) (*Client, error) { - // TODO: #192 Do not use deprecated `aws.EndpointResolver` - // nolint:staticcheck - resolver := aws.EndpointResolverWithOptionsFunc(func(_, _ string, _ ...interface{}) (aws.Endpoint, error) { - return aws.Endpoint{ - URL: endpoint, - }, nil - }) - - // nolint:staticcheck cfg, err := config.LoadDefaultConfig(s.vu.Context(), - config.WithEndpointResolverWithOptions(resolver), + config.WithBaseEndpoint(endpoint), config.WithSharedConfigProfile(params["aws_profile"])) if err != nil { return nil, fmt.Errorf("configuration error: %w", err)