1

I am building an authentication server, for storing the user access tokens and keep track of them i want to use redis.

I have successfully created and deployed a little nodejs app and wrapped it up into a a docker container that only returns the tokens. Then I pushed it to an ECR repo in AWS and created a task that runs and EC2 instance that works perfectly.

So far so good. The problem comes when I try to connect to the cluster I created. I am using this nodejs redis module, that works fine.

I have changed the VPC so all clusters and instances where under the same Network configuration. Maybe this is the point where I messed up because I'm not an expert in deploying and even less in network security groups.

Also I have successfully accessed redis cluster from another EC2 instance (not a docker container, just an ubuntu machine) under the same VPC with the same code snippet, so the code is not the problem.

So according with my test, the problem is not in the VPC, neither the code, so anyone knows what am I missing? Maybe something related to the Dockerfile connections?

I will show here all the configuration I think is needed:

Dockerfile

FROM node:8-alpine
MAINTAINER Sergio Faya Fernandez <[email protected]>
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . .
RUN npm install
EXPOSE 3000
CMD [ "npm", "start" ]

Redis Elasticache cluster enter image description here

Security groups enter image description here enter image description here

Container Security enter image description here

asked Feb 7, 2019 at 0:20

1 Answer 1

1

Nevermind, just found that in my EC2 container I was only accepting http, I changed it to accept all and now it works fine.

answered Feb 7, 2019 at 0:33
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.