diff --git a/cmd/ecr-credential-provider/main.go b/cmd/ecr-credential-provider/main.go index 0d78e046d4..89c98f78af 100644 --- a/cmd/ecr-credential-provider/main.go +++ b/cmd/ecr-credential-provider/main.go @@ -63,11 +63,11 @@ func defaultECRProvider(ctx context.Context, region string) (ECR, error) { var cfg aws.Config var err error if region != "" { - klog.Warningf("No region found in the image reference, the default region will be used. Please refer to AWS SDK documentation for configuration purpose.") cfg, err = config.LoadDefaultConfig(ctx, config.WithRegion(region), ) } else { + klog.Warningf("No region found in the image reference, the default region will be used. Please refer to AWS SDK documentation for configuration purpose.") cfg, err = config.LoadDefaultConfig(ctx) }