Invoke a lambda function with deployment using serverless framework
问题 Is there a way to invoke a lambda function immediately after deployment using serverless framework. This function just creates the SNS Application, which is required to be done once only during setup. I can use serverless deploy stage && serverless invoke --function functionName but that won't tear down the setup if the function fails. I want it to be deployed as part of setup. Thanks 回答1: Hooks can be added to the lifecycle events of the Serverless framework. I used serverless-plugin-scripts