I have an Aws Lambda function which is in VPC, and also an Aws Redis Elasticache which is also in same VPC. I would like to put data to this cache by using Jedis Java client in my Aws Lambda Function, code is like below,
Jedis jedis = new Jedis("cache_url",6379);
jedis.set("testkey", "testvalue");
However, when i try to call this code block, i got an exception connect timeout
My Aws Lambda function is triggered by an Aws IOT Rule very frequently. What can cause this error?, or How can i use Jedis at my Aws Lambda function appropriately.