I have a POC working with Java, AWS API Gateway and Lambda. It is a simple POC to do a transform of some json. I realized or at least I think that I am using version 1 of the java SDK
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-core</artifactId>
<version>1.2.0</version>
</dependency>
Which appears to have a method signature like this for Lambda to run:
public void runner(InputStream inputStream, OutputStream outputStream, Context context) {//...}
So with a new project I do not want to be behind the curve and updated to the presumed SDK version 2
<dependencyManagement>
<dependencies>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.6.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>lambda</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>apigateway</artifactId>
</dependency>
</dependencies>
Problem is I cannot seem to find any documentation on what the lambda signature should look like now. I am trying the below but receive a 502 Bad Gateway.
public void run(ApiGatewayRequest request) {//...}
Is my assumption of SDK versions correct? If so where is documentation on this newer version?
I have looked at both https://github.com/aws/aws-sdk-java-v2 https://aws.amazon.com/sdk-for-java/
both of which seem to refer back to com.amazonaws
instead of software.amazon.awssdk
.