Blenra
Optimized for: Gemini / ChatGPT / Claude

Advanced AI Prompt for Preventing Recursive Lambda Loop Costs

Use this engineered prompt to drastically optimize your workflow and output.

Required Variables

  • [EVENT_SOURCE]
  • [TRIGGER_CONDITION]
  • [LOG_ALERTS]
preventing-lambda-recursive-loops.txt
Develop a safety framework to prevent recursive loops between [EVENT_SOURCE] and the Lambda function. Design a 'Circuit Breaker' pattern using DynamoDB or local environment variables to track execution depth. Provide a CloudWatch Metric Filter and Alarm configuration based on [LOG_ALERTS] that triggers an SNS notification and disables the function if a recursive pattern is detected, preventing catastrophic billing events.

Example Output

"The AI would generate a code snippet for an execution-depth header check and a CloudWatch Alarm JSON policy to auto-throttle the function upon loop detection."