Class LambdaInvokerFactory


  • public final class LambdaInvokerFactory
    extends Object
    A factory for objects that implement a user-supplied interface by invoking a remote Lambda function.

    public class Request { // Standard POJO stuff here modeling the input your Lambda function // expects. } public class Result { // More standard POJO stuff here modeling the output your Lambda // function produces. } public interface LambdaFunctions {

    • Method Detail

      • build

        public static <T> T build​(Class<T> interfaceClass,
                                  AWSLambda awsLambda)
        Creates a new Lambda invoker implementing the given interface and wrapping the given AWSLambda client.
        Parameters:
        interfaceClass - the interface to implement
        awsLambda - the lambda client to use for making remote calls
      • build

        public static <T> T build​(Class<T> interfaceClass,
                                  AWSLambda awsLambda,
                                  LambdaInvokerFactoryConfig config)
        Creates a new Lambda invoker implementing the given interface and wrapping the given AWSLambda client.
        Parameters:
        interfaceClass - the interface to implement
        awsLambda - the lambda client to use for making remote calls
        config - configuration for the LambdaInvokerFactory