Tutorial: Configuring a Lambda function to access amazon ElastiCache in an Amazon VPC - Amazon ElastiCache
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Tutorial: Configuring a Lambda function to access amazon ElastiCache in an Amazon VPC

In this tutorial, you do the following:

  • Create an Amazon ElastiCache cluster in your default Amazon Virtual Private Cloud (Amazon VPC) in the us-east-1 region.

  • Create a Lambda function to access the ElastiCache cluster. When you create the Lambda function, you provide subnet IDs in your Amazon VPC and a VPC security group to allow the Lambda function to access resources in your VPC. For illustration in this tutorial, the Lambda function generates a UUID, writes it to the cache, and retrieves it from the cache.

  • Invoke the Lambda function manually and verify that it accessed the ElastiCache cluster in your VPC.

Important

The tutorial uses the default Amazon VPC in the us-east-1 region in your account. For more information about Amazon VPC, see How to Get Started with Amazon VPC in the Amazon VPC User Guide.

Get Started

Step 1: Create an ElastiCache cluster