Node Redis with AWS

user602525 picture user602525 · Mar 16, 2014 · Viewed 12.9k times · Source

AWS has Redis support via the ElastiCache Service. My question is, can I connect to Redis on AWS Elasticache from node, using the following:

var client = require('redis').createClient(6379, 'elastichache endpoint string', {no_ready_check: true});

Or do I have to use the NodeJS AWS SDK?

I realize I could set up my own Redis Server on an EC2 instance, but I want to use ElastiCache. Is this possible?

Answer

Ben Whaley picture Ben Whaley · Mar 16, 2014

Yes, this is a common use case. You can connect directly to redis without using the SDK. Just make sure you have configured the security group correctly to allow access from your app server.