From 88c5e30f9f8d078ac7ae4e0d251001001aaf3754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20R=C3=B6snick-Neugebauer?= Date: Tue, 5 Dec 2023 09:24:02 +0100 Subject: [PATCH] Fix: pod not picking up role from service account See: https://github.com/aws/aws-sdk-go/issues/4436 --- src/checkers/periodicAwsChecker.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/checkers/periodicAwsChecker.go b/src/checkers/periodicAwsChecker.go index 9a922a1..946b878 100644 --- a/src/checkers/periodicAwsChecker.go +++ b/src/checkers/periodicAwsChecker.go @@ -43,7 +43,8 @@ func (p *PeriodicAwsChecker) StartChecking() { p.exporter.ResetMetrics() // Create a Session with a custom region - svc := secretsmanager.New(session.New(), aws.NewConfig().WithRegion(p.awsRegion)) + session, _ := session.NewSession() + svc := secretsmanager.New(session, aws.NewConfig().WithRegion(p.awsRegion)) for _, secretName := range p.awsSecrets { glog.Info("Getting secret " + secretName + " from AWS Secrets Manager")