I am trying to make Serverless work with Elasticache. I wrote a custom CloudFormation file based on serverless-examples/serverless-infrastructure repo. I managed to put Elasticache and Lambda in one subnet (checked with the cli). I retrieve the host and the port from the Outputs, but whenever I am trying to connect with node-redis the connection times out. Here are the relevant parts:
I ran into this issue as well, but with Python. For me, there were a few problems that had to be ironed out
redis.RedisClient(... ssl=True)
. The redis-py page mentions that ssl_cert_reqs
needs to be set to None
for use with ElastiCache, but that didn't seem to be true in my case. I did however need to pass ssl=True
.It makes sense that ssl=True
needed to be set but the connection was just timing out so I went round and round trying to figure out what the problem with the permissions/VPC/SG setup was.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With