From 7ce6e861ef4032c8ebb6972fd951cf14afa752df Mon Sep 17 00:00:00 2001 From: William Will <10997562+willwill96@users.noreply.github.com> Date: Wed, 16 Apr 2025 05:20:19 +0000 Subject: [PATCH] do not use aws iam if not opted in --- pkg/sessions/redis/redis_store.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/sessions/redis/redis_store.go b/pkg/sessions/redis/redis_store.go index 6d1a5f85..c1daaec2 100644 --- a/pkg/sessions/redis/redis_store.go +++ b/pkg/sessions/redis/redis_store.go @@ -185,6 +185,9 @@ func buildStandaloneClient(opts options.RedisStoreOptions) (Client, error) { } func setupAWSIAMAuth(opts options.RedisStoreOptions, opt *redis.Options) error { + if !opts.UseAWSIAMAuth { + return nil + } if opts.AWSServiceName != "elasticache" && opts.AWSServiceName != "memorydb" { return fmt.Errorf("AWS IAM auth is only supported for elasticache and memorydb") }