From b214bbd90871b65dcceff387e4b2e37951735218 Mon Sep 17 00:00:00 2001 From: azhelev Date: Tue, 22 Aug 2023 09:26:07 +0300 Subject: [PATCH] Support obtaining credentials from AWS IRSA (#12) --- pkg/awsdiscovery/discovery_aws.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/awsdiscovery/discovery_aws.go b/pkg/awsdiscovery/discovery_aws.go index c0f9a05..053ad49 100644 --- a/pkg/awsdiscovery/discovery_aws.go +++ b/pkg/awsdiscovery/discovery_aws.go @@ -31,7 +31,7 @@ func (d DiscoveryClientAWS) GetInstances() ([]discovery.Instance, error) { Filters: d.filter(), } if ec2Client == nil { - awsSession := session.New() + awsSession := session.Must(session.NewSession()) awsConfig := &aws.Config{} ec2Client = ec2.New(awsSession, awsConfig) }