Blenra
Optimized for: Gemini / ChatGPT / Claude

Advanced AI Prompt for Step Functions vs. Lambda Logic Refactoring

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

Required Variables

  • [MONOLITHIC_LAMBDA_CODE]
  • [MAX_RUNTIME]
  • [RETRY_LOGIC]
step-functions-vs-lambda-logic.txt
Review this [MONOLITHIC_LAMBDA_CODE] which is hitting [MAX_RUNTIME] limits. Identify logical branches and [RETRY_LOGIC] that can be offloaded to AWS Step Functions (Express Workflows). Map out a state machine architecture that reduces individual Lambda execution times and prevents 'double billing' where one Lambda waits for another. Analyze the cost-per-state-transition vs. the cost-per-execution-second to justify the architectural shift.

Example Output

"The AI would provide an ASL (Amazon States Language) definition to replace complex nested loops and retries within the Lambda function."