Connect to ElastiCache cluster from AWS Lambda function

Mircea Soaica picture Mircea Soaica · Jan 3, 2015 · Viewed 25.9k times · Source

Is it possible to connect from an AWS Lambda function to a Redis ElastiCache cluster?

I can't figure out if it's a configuration problem or it's simply not possible.

PS: I made a test from an EC2 instance and I can connect to the Redis node. Also the Lambda function and the Redis node are in the same region.


UPDATE (09 Oct 2015):

Amazon announced VPC for AWS Lambda functions. Details here

This means we can now access any resource in AWS behind VPC security group, including ElastiCache and RDS machines.

UPDATE (11 Feb 2016): Amazon launched VPC for AWS Lambda.

https://aws.amazon.com/about-aws/whats-new/2016/02/access-resources-within-a-vpc-using-aws-lambda/

Answer

greg_diesel picture greg_diesel · Apr 7, 2015

As of Feb 2016, AWS allows using lambda functions to connect to Elasticache. Refer to Access Resources within a VPC using AWS Lambda. Here is a link how it works - Tutorial: Configuring a Lambda Function to Access Amazon ElastiCache in an Amazon VPC