Class CallbackExample

java.lang.Object
software.amazon.lambda.durable.DurableHandler<ApprovalRequest,String>
software.amazon.lambda.durable.examples.callback.CallbackExample
All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestStreamHandler

public class CallbackExample extends DurableHandler<ApprovalRequest,String>
Example demonstrating callback operations for external system integration.

This handler demonstrates a human approval workflow:

  1. Prepare the request for approval
  2. Create a callback and send the callback ID to an external approval system
  3. Suspend execution until the external system responds
  4. Process the approval result

External systems respond using AWS Lambda APIs:

  • SendDurableExecutionCallbackSuccess - approve with result
  • SendDurableExecutionCallbackFailure - reject with error
  • SendDurableExecutionCallbackHeartbeat - keep callback alive