I'm having issues connecting from Elastic BeanStalk to ElastiCache Redis. When I SSH into the EBS instance and try to use redis-cli to connect, it times out. This is how I set up my environment:
I have an existing VPC with two subnets.
I created a Security Group specifically for this that has an Inbound rule for IPv4, Custom TCP, port 6379, source 0.0.0.0/0
I created an ElastiCache Redis cluster with the following relevant parameters:
- Cluster mode: disabled
- Location: AWS Cloud, Multi-AZ enabled
- Cluster settings: number of replicas - 2
- Subnet group settings: existing subnet group with two associated subnets
- Availability Zone placements: no preference
- Security: encryption at rest enabled, default key
- Security: encryption in transit enabled, no access control
- Selected security groups: the one I described above
As for the EBS environment, it has this configuration:
- Platform: managed, Node.js 16 on Amazon Linux 2 5.5.3
- Instance settings: Public IP address UNCHECKED, both Instance subnets checked
- Everything else left default
After getting all of that set up, I would SSH into the EBS instance and follow the directions here to install redis-cli and try to connect: https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/GettingStarted.ConnectToCacheNode.html
I've tried using the Primary endpoint, the Reader endpoint, and all of the individual node endpoints, but I get a timeout error for all of them.
Is there some configuration that I'm missing?