title: Connect AWS redis to node using node-redis
body: <p>I am using node-redis and having a hard time connecting to external redis instance. I tried with redis-cli and it worked. However with node I am not able to figure out how to properly give the url and port. </p>
  
  <p><strong>With Redis-cli-</strong> </p>
  
  <pre><code>redis-cli -h mydomain.something.something.cache.amazonaws.com -p 6379
  </code></pre>
  
  <p><strong>However with nodejs</strong></p>
  
  <p>Below didn't work </p>
  
  <pre><code>var client = redis.createClient('redis://mydomain.something.something.cache.amazonaws.com:6379'),
  </code></pre>
  
  <p>neither </p>
  
  <pre><code>var client = redis.createClient({host:'redis://mydomain.something.something.cache.amazonaws.com', port: 6379});
  </code></pre>
  
  <p>How do I configure it. Please help.</p>