2

I want to establish a connection with Redis to Nestjs I have searched a lot but I can not figure it out. i establish a connection with my localhost Redis with Nestjs with CacheModule like this CacheModule.register({ store: redisStore, host: 'localhost', port: 6379, }), but how can I connect elastic cache Redis. I am using nests with rds Postgres I have deployed on the elastic beanstalk also create a Redis cluster and created a security group for rds and Redis connect these security groups to elastic beanstalk but the issue with Nestjs code do not know how to write if anyone knows please do help me in this headache situation

  • Did you try passing the remote redis credentials to `CacheModule.register` ? You should have those from AWS – fmi21 Jun 30 '22 at 09:39
  • yeah I passed the remote Redis credentials but received this errno: -3008, web: code: 'ENOTFOUND', web: syscall: 'getaddrinfo', web: hostname: '.....' – muhammad adeel Jun 30 '22 at 11:26
  • I have passed the Redis Primary endpoint as a host address and also set the security group inbound rule TCP 6379 and the source itself – muhammad adeel Jun 30 '22 at 11:30

0 Answers0