Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sharing variables across two aws lambda functions

I have two AWS lambda functions - lambdaA and lambdaB.

The http client calls API Gateway endpoint A that invokes lambdaA which generates a uuid and returns to the client.

The client then calls API Gateway endpoint B that invokes lambdaB and passes uuid generated by lambdaA to lambdaB. How does lambdaB verify the uuid is generated by lambdaA.

I could think of using a cache - elastic cache or db - dynamodb. But I don't like elastic cache as it runs a server and dynamodb is probably a little too heavy for my simple use case.

Is there any other simpler way of caching data with AWS lambda.

like image 216
rOrlig Avatar asked Oct 29 '22 21:10

rOrlig


1 Answers

DynamoDB and Elasticache recommended. Also, read the following article by Kenneth Falck:

Amazon AWS Lambda data caching solutions compared

and How HipChat Stores And Indexes Billions Of Messages Using ElasticSearch And Redis

like image 199
Reza Mousavi Avatar answered Nov 15 '22 05:11

Reza Mousavi