Connecting to Redis from localhost
Check your security group of Elastic cache cluster. It should allow port 6379 from the EC2 instance. You can allow your EC2 instance's security group in Elastic cache security group to access port 6379.
I am using ElastiCache for Redis on AWS. But, I'm not able to connect to Redis from localhost. I have used the endpoint on AWS. It always shows connection timed out. Is there a way to make it work?