aws auth use default creds when none are supplied (#17932)

Signed-off-by: Caleb Lloyd <caleblloyd@gmail.com>
Co-authored-by: Vadim Bauer <vb@container-registry.com>
This commit is contained in:
Caleb Lloyd 2023-02-03 13:52:53 -07:00 committed by GitHub
parent bfe4362a67
commit 901cc17c67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,6 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds"
"github.com/aws/aws-sdk-go/aws/session"
awsecrapi "github.com/aws/aws-sdk-go/service/ecr"
@ -102,8 +101,6 @@ func getAwsSvc(region, accessKey, accessSecret string, insecure bool, forceEndpo
accessKey,
accessSecret,
"")
} else {
cred = ec2rolecreds.NewCredentials(sess)
}
config := &aws.Config{