As seen previously, the handler becomes the entry point to the Lambda function. The AWS Lambda functions in Java can have two types of handlers, discussed as follows. Please note that this holds true for any language that runs on the JVM.
Handlers implementing standard interfaces, in this approach, the Lambda function handler implements the standard interfaces that are defined in the aws-lambda-core library. There are two standard interfaces, as follows:
- RequestHandler: The following code block shows how a Lambda function is written when implementing the RequestHandler<I,O>interface. The RequestHandler<I,O> interface has a method definition, as follows:
public O handleRequest(I name, Context context);
The code with this ...