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") }