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

前端 未结 5 1550
耶瑟儿~
耶瑟儿~ 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 19:15

    As a sidenote, when creating an AWS Lambda Java project in Eclipse, one must also add

    
        com.amazonaws
        aws-java-sdk-lambda
        1.11.411
    
    

    to the pom.xml otherwise these imports will fail:

    import com.amazonaws.services.lambda.AWSLambdaAsyncClient;
    import com.amazonaws.services.lambda.model.InvokeRequest;
    import com.amazonaws.services.lambda.model.InvokeResult;
    

提交回复
热议问题