AWS Lamda to Amazon ElastiCache integration pattern

AWS Lambda → Amazon ElastiCache

Create a Redis Cluster in Amazon ElastiCache and read/write with a Lambda function.

Users may want to connect to ElastiCache from their core Lambda function for use cases that involve fast read-write operations and improve latency of applications.
In an application like a leader board, queue/wait-list , API rate limiting & quota management, etc. that are built on Serverless platform , the core computing Lambda function would integrate with a either Redis or Memcache on Amazon ElastiCache.
This pattern provides a quick start guide to launch a Redis cluster in Amazon ElastiCache in a defined VPC and creates a Lambda function that read writes from that cache.
Users can further modify the code in the Lambda function as per their requirements. You can configure Memcached by modifying the cdk config and change Lambda code appropriately.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/lambda-elasticache-integrationpattern-cdk

Deploy

cdk deploy


Testing

See the README.md file of GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: cdk delete.

Created by:

Sushanth Kothapally

Sushanth Kothapally

Solutions Architect at AWS. Passionate about solving technical problems to meet business objectives.

Follow on LinkedIn