skip to Main Content

I have an application deployed in AWS EC2 which uses Elasticache Redis. I want to migrate it to ECS and I have everything set up, but when I run it the app gets timeout accessing Redis from ECS.

In the AWS documentation it says that Elasticache is ment to be accessed from EC2, but has anybody tried to use it from ECS?

Thanks in advance

PS: it’s not a security groups problem because both AWS EC2 instances and ECS tasks use the same security group.

2

Answers


  1. Chosen as BEST ANSWER

    Problem solved. The issue was in a configuration file loaded by error, I was trying to connect to a redis located in another VPC instead of connecting to the one in the same VPC.


  2. I had encountered the similar timeout (reading from the comments) but that was because of TLS wasn’t configured properly from my application. However, this shouldn’t be the case if your application is working from the EC2 and being able to access the redis.

    Some debugging questions that hit my head are:

    • If you can access the redis connection locally through SSH tunneling or not?
    • Is the ECS cluster and redis service lying in the same VPC and configured properly?
    • Also how are you accessing redis from the EC2?

    If you can let us know about these questions then probably we can help identify the root cause.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search