- Newest
- Most votes
- Most comments
Hello,
To connect to your Redis instance from your Lambda, you need to open at least ports 6379 and 6380 in the Outbound Rules, and your Lambda must be in the same VPC as your Redis. Here’s a way to connect to it in Python:
import redis
redisClient = redis.StrictRedis (
host = <ENDPOINT>,
port = 6379,
decode_responses = True,
ssl = True
)
Make sure to include the ssl = True parameter.
And as you are in in Cluster Mode, you also need to open the ports 16379-16380 according to that doc
Hope it helps 😊
So turns out it is something to do with the ports but, also to do with the actual implementation of the redis connector and how it connects to different nodes.
Best explanation I found on fixing this problem was from here https://www.dragonflydb.io/error-solutions/redis-exceptions-responseerror-moved.
Will let you know which ports this actually connects on and uses.
answered 2 years ago
Relevant content
asked 3 years ago
