By using AWS re:Post, you agree to the Terms of Use

Lightsail container - connect to ElastiCache

0

Hello,

I would like to connect to my ElastiCache (redis) from a Lightsail container, but I can't change the subnet group (VPC) settings for my container.

Is it possible or not?

Regards.

  • So to clarify, you have an Amazon ElastiCache for Redis cluster running in one subnet of your VPC and would like to connect the ElastiCache cluster to a Lightsail container running in another subnet in the same VPC?

    1. I created ElastiCache Redis cluster with Multi-AZ option in eu-central-1a/eu-central-1b zones
    2. I created a Lightsail container service in the same eu-central-1 region
    3. I deployed my image with the redis client to try to connect to the primary endpoint (6379 port) of my Redis cluster
    4. After starting my container, I get the message: "Operation timed out"
    5. Can I connect from a Lightsail container to ElastiCache Redis cluster?
1 Answer
0

Hello, and thank you for using Amazon Lightsail.

To do this, you'd want to use Lightsail's VPC Peering feature: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-how-to-set-up-vpc-peering-with-aws-resources

You would need the ElastiCache Redis cluster to be created in your account's default VPC. Then, after enabling VPC peering in the region within Lightsail, you should be able to connect to your Redis cluster, assuming your cluster's security group rules allow it.

I hope this helps!
-Max

answered 7 months ago
  • Hello,

    Thanks for the answer. I tried and it didn't work for me =( At that moment.. when I was sure that everything was now correctly configured - I still could not connect to the primary endpoint of my ElastiCache Redis.

    Has anyone made a good post or video review about this case?

    Kind regards

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions