Serverless Lambda chaining
Serverless service which shows how one can chain Lambdas through SNS. The configuration which triggers the chain mechanims is defined on serverless.yml.
Installation
Make sure that you use Serverless v1.
- Run
serverless install --url https://github.com/pmuens/serverless-lambda-chainingto install the service in your current working directory - Next up cd into the service with
cd serverless-lambda-chaining - Run
npm install - Replace the
accountIdin thehandler.jsfile with your AWS account id - Deploy with
serverless deploy
How to use
- Run
serverless invoke --function firstLambdato trigger the chaining process (this will publish a message to the SNS topic calleddispatcherthesecondLambdawill listen to) - Run
serverless logs --function secondLambdato see that the message which was send to thedispatchertopic successfully triggered thesecondLambdafunction
AWS services used
- Lambda
- SNS
References
https://serverless.com/framework/docs/providers/aws/events/sns/#sns

