diff --git a/pkg/eks/auth/generator.go b/pkg/eks/auth/generator.go index 8c7edc8d993..ecc8f9282e3 100644 --- a/pkg/eks/auth/generator.go +++ b/pkg/eks/auth/generator.go @@ -6,7 +6,10 @@ import ( "fmt" "time" + "github.com/aws/aws-sdk-go-v2/aws/retry" "github.com/aws/aws-sdk-go-v2/service/sts" + + "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" api "github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha5" @@ -68,5 +71,9 @@ func (g Generator) appendPresignHeaderValuesFunc(clusterID string) func(stsOptio stsOptions.APIOptions = append(stsOptions.APIOptions, smithyhttp.SetHeaderValue(clusterIDHeader, clusterID)) // Add X-Amz-Expires query param stsOptions.APIOptions = append(stsOptions.APIOptions, smithyhttp.SetHeaderValue("X-Amz-Expires", "60")) + stsOptions.APIOptions = append(stsOptions.APIOptions, func(stack *middleware.Stack) error { + _, err := stack.Finalize.Remove((&retry.MetricsHeader{}).ID()) + return err + }) } }