1

I started looking into AWS MemoryDB after spending sometime setting up a cluster. I was able to connect using redis-cli but couldn't connect using redis-py-cluster even though I used the same credentials. Below is my redis-cli command and python script using redis-py-cluster.

Redis CLI

redis-cli -h HOST --tls -p 6379 -a PWD --user username

Python code


from rediscluster import RedisCluster
startup_nodes = [{"host": "HOST", "port": "6379"}]
rd = RedisCluster(startup_nodes=startup_nodes, username="USER", password="PWD", decode_responses=True, skip_full_coverage_check=True)

Any help would be really appreciated.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Ebuka
  • 75
  • 2
  • 7

1 Answers1

2

The problem was with the initialization of RedisCluster. Below is the correct parameters especially the ssl=True

rd = RedisCluster(startup_nodes=startup_nodes, username="demo-user", password="<PW>", decode_responses=True,ssl=True,skip_full_coverage_check=True)

Community
  • 1
  • 1
Ebuka
  • 75
  • 2
  • 7