AWS Lambda introduces recursive loop detection APIs
Compute Blog
The article describes new APIs introduced by AWS Lambda to control recursive loop detection for individual functions. Recursive loop detection is a built-in feature that stops Lambda functions caught in an infinite loop to prevent runaway workloads and unexpected billing.
Specifically, the article covers:
- An overview of recursive loop detection in Lambda, which detects and stops infinite loops between Lambda, SQS, and SNS after around 16 invocations
- Two new APIs: GetFunctionRecursiveConfig and PutFunctionRecursiveConfig to get and set recursive loop detection configuration for individual Lambda functions
- How to use the new APIs through the Lambda console, AWS CLI, CloudFormation, SAM, and CDK
- How to identify functions using recursive patterns by monitoring the RecursiveInvocationsDropped CloudWatch metric
- Conclusion advising to architect workloads to avoid recursive loops, but use the new APIs to opt out for specific functions if needed
The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.
Related articles
Aug 20
2024
2024
AWS Lambda now supports function-level configuration for recursive loop detection
Oct 9
2024
2024
AWS Lambda now detects and stops recursive loops between Lambda and Amazon S3
Oct 30
2024
2024
AWS Lambda now supports AWS Fault Injection Service (FIS) actions
Nov 18
2025
2025
AWS Lambda adds support for Python 3.14
The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.