@Test public void testLambdaFunctionHandler() { FunctionHandler handler = new FunctionHandler(); Context ctx = createContext(); Object output = handler.handleRequest(input, ctx); if (output != null) { System.out.println(output.toString()); } }
public Object handleRequest(Object input, Context context) { LambdaLogger logger = context.getLogger(); logger.log("Start of Lambda Function, input: " + input); logger.log("End of Lambda Function,\n"); logger.log( context.getRemainingTimeInMillis() + " millisecond of time remaining.\n"); logger.log( Runtime.getRuntime().freeMemory() + " memory free\n"); return input; }
FunctionHandler implements RequestHandler<Object, Object> { public Object handleRequest(Object input, Context context) { LambdaLogger logger = context.getLogger(); logger.log("Start of Lambda Function, input: " + input); logger.log("End of Lambda Function,\n"); logger.log( context.getRemainingTimeInMillis() + " millisecond of time remaining.\n"); logger.log( Runtime.getRuntime().freeMemory() + " memory free\n"); return input; } }
FunctionHandler implements RequestHandler<Object, Object> { public Object handleRequest(Object input, Context context) { LambdaLogger logger = context.getLogger(); logger.log("Start of Lambda Function, input: " + input); logger.log("End of Lambda Function,\n"); logger.log( context.getRemainingTimeInMillis() + " millisecond of time remaining.\n"); logger.log( Runtime.getRuntime().freeMemory() + " memory free\n"); return input; }  }
FunctionHandler implements RequestHandler<Object, Object> { public Object handleRequest(Object input, Context context) { LambdaLogger logger = context.getLogger(); logger.log("Start of Lambda Function, input: " + input); logger.log("End of Lambda Function,\n"); logger.log( context.getRemainingTimeInMillis() + " millisecond of time remaining.\n"); logger.log( Runtime.getRuntime().freeMemory() + " memory free\n"); return input; }  Object handleRequest(Object input, Context context); }
FunctionHandler implements RequestHandler<Object, Object> { public Object handleRequest(Object input, Context context) { LambdaLogger logger = context.getLogger(); logger.log("Start of Lambda Function, input: " + input); logger.log("End of Lambda Function,\n"); logger.log( context.getRemainingTimeInMillis() + " millisecond of time remaining.\n"); logger.log( Runtime.getRuntime().freeMemory() + " memory free\n"); return input; }  Object handleRequest(Object input, Context context);  }