How to invoke the AWS lambda function / handler from Java code

前端 未结 5 1583
耶瑟儿~
耶瑟儿~ 2021-01-19 18:40

I am new to AWS lambda I have created a lambda function with handler

example.Orders::orderHandler

And this is the custom handler, now I wa

5条回答
  •  既然无缘
    2021-01-19 18:51

    You define the handler when you deploy the Lambda function. Only the AWS Lambda service needs to know what your custom handler is. So the handler has no relevance in the Java code that is invoking the function. Anything invoking the Lambda function only needs to know the Lambda function name, not the handler name.

    In Java you would invoke the Lambda function via the AWSLambdaClient.invoke() method documented here.

提交回复
热议问题