Home:ALL Converter>Invoking AWS Lambda Functions from Java

Invoking AWS Lambda Functions from Java

Ask Time:2021-05-03T21:47:31         Author:Hamza Yerlikaya

Json Formatter

I have a long running AWS Lambda function that I am executing from my webapp. Using the documentation [1], it works fine however my problem is this particular lambda function does not return anything back to the application its output is saved to S3 and it runs for a long time 20-30s. Is there a way to trigger the lambda and not wait for the return value since I don't want to wait/block my app while the lambda is running. Right now I am using an ExecutorService as a que to execute lambda requests since I have to wait for each invocation, when the app crashes or restarts I lose jobs that are waiting to be executed.

[1] https://aws.amazon.com/blogs/developer/invoking-aws-lambda-functions-from-java/

Author:Hamza Yerlikaya,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/67370073/invoking-aws-lambda-functions-from-java
yy