* Moved Lambda examples to separate module
Implementation of API Gateway example

* Format fixes

* Format fixes

* Minor fixes

* Minor fixes

* Minor fixes
This commit is contained in:
markusgulden
2018-06-24 05:03:32 +02:00
committed by KevinGilmore
parent 65221919f7
commit bde11efe2c
10 changed files with 334 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
package com.baeldung.lambda;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestStreamHandler;
import org.apache.commons.io.IOUtils;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public class LambdaRequestStreamHandler implements RequestStreamHandler {
public void handleRequest(InputStream inputStream, OutputStream outputStream, Context context) throws IOException {
String input = IOUtils.toString(inputStream, "UTF-8");
outputStream.write(("Hello World - " + input).getBytes());
}
}