Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting to Elasticache Redis Cluster from Peered VPC

I have a corporate setup that primarily has 2 peered VPCs at the moment. We want to provision Elasticache (for Redis) so that 2 EC2 IIS Web Servers (one in each of the two VPCs) can connect to the same Elasticache cluster, is this possible?

Currently I can successfully connect to the cluster from the EC2 instance that is in the same VPC that the Elasticache cluster was provisioned in, but the other EC2 instance in the peered VPC cannot connect.

I tried allowing all access through security groups, turned off firewalls, etc... but nothing works.

Any help you can provide would be greatly appreciated.

like image 764
Mark Avatar asked Sep 26 '22 22:09

Mark


1 Answers

We encountered the same issue and it turned out that route table configuration was not properly set in our case.
Route table for elasticache subnet need to have a config below.
Destination -> IP address range for client EC2 instance subnet
Target -> peering connection ('pcx-xxxxx')

like image 87
Yosuke Avatar answered Sep 30 '22 08:09

Yosuke