Currently, I am using go-redis
package to interface with AWS elasticache for Redis. I am authenticating into the redis instance like so,
import "github.com/go-redis/redis"
func pingRedis() {
cli := redis.NewClient(redis.Options{
Addr: "redis-address",
Password: "redis-password",
DB: 0,
})
_, err := cli.Ping().Result()
if err != nil {
log.Error(err, "could not establish connection")
return
}
}
With the recent addition of support for IAM auth for redis clusters, I'm looking to move away from the Password
usage and take advantage of the IAM auth. How should I go about authenticating into elasticache redis using IAM with the go-redis
package?