For me, the issue was different. I found AWS ElastiCache Valkey uses the default VPC security group, and the security group's inbound rule source was the security group itself ( in my case ), although I needed it to be the Lambda security group instead. If you want a quick solution that is not secure and may cause issues later, you can add the Lambda security group to the ElastiCache cluster. But the Lambda security group should definitely have inbound access to itself. Although in this case, you will be making unnecessary allowances to this group. ( not secure )