From 740f9d3fc4be0f1edf92419da8ef9b0bc072b281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Sun, 27 Mar 2022 11:14:19 +0200 Subject: [PATCH] internal/resource: enable DualStack for S3 connections DualStack endpoints allows IPv6 connections to AWS S3 buckets. This is need for IPv6 native subnets. Fixes #1340 --- internal/resource/url.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/resource/url.go b/internal/resource/url.go index 834236735..9f9ec280f 100644 --- a/internal/resource/url.go +++ b/internal/resource/url.go @@ -464,7 +464,7 @@ func (f *Fetcher) fetchFromS3WithCreds(ctx context.Context, dest s3target, input return err } - awsConfig := aws.NewConfig().WithHTTPClient(httpClient) + awsConfig := aws.NewConfig().WithHTTPClient(httpClient).WithUseDualStack(true) s3Client := s3.New(sess, awsConfig) downloader := s3manager.NewDownloaderWithClient(s3Client) if _, err := downloader.DownloadWithContext(ctx, dest, input); err != nil {