Skip to content

"Invalid protocol" when trying to connect to Elasticache Redis in Node.js #2201

@cmgchess

Description

@cmgchess

Hello

I'm trying to connect an ElastiCache Redis to an Express server deployed on ECS.

I get the Primary Endpoint from ElastiCache as blablabla.mccjet.ng.0001.euc1.cache.amazonaws.com:6379

In my server I try to connect like this

const { createClient } = require("redis");
const pubClient = createClient({ url: 'blablabla.mccjet.ng.0001.euc1.cache.amazonaws.com:6379' });

But when I check the ECS logs I see

/usr/src/app/node_modules/@redis/client/dist/lib/client/index.js:124
throw new TypeError('Invalid protocol');
^
TypeError: Invalid protocol
at Function.parseURL (/usr/src/app/node_modules/@redis/client/dist/lib/c...

Any help on what I might be missing
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions