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-chaining
to install the service in your current working directory - Next up cd into the service with
cd serverless-lambda-chaining
- Run
npm install
- Replace the
accountId
in thehandler.js
file with your AWS account id - Deploy with
serverless deploy
- Run
serverless invoke --function firstLambda
to trigger the chaining process (this will publish a message to the SNS topic calleddispatcher
thesecondLambda
will listen to) - Run
serverless logs --function secondLambda
to see that the message which was send to thedispatcher
topic successfully triggered thesecondLambda
function
- Lambda
- SNS
https://serverless.com/framework/docs/providers/aws/events/sns/#sns