npm install --save-dev @distinction-dev/serverless-lambda-recursiveloop
A Serverless Framework plugin that adds a RecursiveLoop property to AWS Lambda function configurations. This property controls the recursive loop detection behavior for Lambda functions.
The RecursiveLoop property allows you to configure how AWS Lambda handles recursive loop detections for your functions.
-
Allowed Values:
Allow: No action is taken if a recursive loop is detected.Terminate: The function invocation is stopped, and a notification is sent when a recursive loop is detected.
-
Type: String
-
Required: No
-
Resource Type:
AWS::Lambda::Function
To use this plugin in your Serverless project, follow these steps:
-
Create the Plugin File: Create a file named
serverless-recursive-loop-plugin.jsin the root directory of your Serverless project and paste the plugin code into it. -
Add the Plugin to Your Serverless Configuration: In your
serverless.ymlfile, add the plugin under thepluginssection.service: my-service provider: name: aws runtime: nodejs14.x plugins: - "@distinction-dev/serverless-lambda-recursiveloop" functions: myFunction: handler: handler.myFunction recursiveLoop: Terminate anotherFunction: handler: handler.anotherFunction recursiveLoop: Allow