I have created simple Lambda function and upload this to AWS Lambda.
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.r
Another way to invoke lambda from java code is to use LambdaInvokerFactory
and I found this approach cleaner.
You need to do the following:
Define interface representing your function and annotate method with @LambdaFunction
Create implementation of the above interface using LambdaInvokerFactory
Invoke lambda function using just created proxy object (interface implementation)
More detailed example can be found here.