Web: https://www.reddit.com/r/aws/comments/s2biw5/my_express_apis_on_ecs_are_not_able_to_connect_to/

Jan. 12, 2022, 5:18 p.m. | /u/AliounePape

Amazon Web Services (AWS): S3, EC2, SQS, RDS, DynamoDB, IAM, CloudFormation, Route 53, VPC and more reddit.com

I'm using Elasticache for my Redis cluster (Cluster disabled mode) and when I deploy my microservices on ECS they fail to connect to the Elasticache. They are on the same VPC and I tried to test the connection from an EC2 instance and I'm able to ping and connect to the Redis Cluster without error.

https://preview.redd.it/cs7lkcamiab81.png?width=1810&format=png&auto=webp&s=fde94a664f346d7663e55cbd7358d130a3054f67

But there is a connection error when I deploy the microservices containers on ECS and start pinging localhost:6379 and fail again like on the image below:

https://preview.redd.it/3sbo6drpiab81.png?width=2226&format=png&auto=webp&s=faea70f9dceb35763b83be7948d515efc8ab18db

As you can see even …

api aws cluster connect ecs express redis

More from reddit.com / Amazon Web Services (AWS): S3, EC2, SQS, RDS, DynamoDB, IAM, CloudFormation, Route 53, VPC and more

Machine Learning Platform Engineer - Team Lead

@ Arctic Wolf Networks | Kitchener-Waterloo, Ontario, Canada or Toronto, Ontario, Canada

Staff Support Engineer - Terraform

@ HashiCorp | United States (Remote)

Cloud Security Engineer

@ Novetta | Arlington, VA

AWS Solutions Architect - FL

@ Amazon.com | US, FL, Virtual Location - Florida

DevOps Engineer, Cloud

@ Hyperscience | Germany

Cloud Infrastructure Architect, Professional Services, Federal Civilian focus

@ Amazon.com | US, MD, Virtual Location - Maryland