Serverless service which shows how one can chain Lambdas through SNS. The configuration which triggers the chain mechanims is defined on serverless.yml.
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
- 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
- Lambda
- SNS
https://serverless.com/framework/docs/providers/aws/events/sns/#sns