See: Description
Interface | Description |
---|---|
LambdaFunctionNameResolver |
Class | Description |
---|---|
DefaultLambdaFunctionNameResolver |
Determine function name from the
LambdaFunction annotation's functionName attribute if
present otherwise uses the method name. |
LambdaInvokerFactory |
A factory for objects that implement a user-supplied interface by invoking a remote Lambda
function.
|
LambdaInvokerFactory.Builder | |
LambdaInvokerFactoryConfig | Deprecated
Use
LambdaInvokerFactory.builder() to configure invoker factory. |
Exception | Description |
---|---|
LambdaFunctionException |
An exception representing the failed execution of a remote Lambda function.
|
LambdaSerializationException |
An exception thrown if there's a problem serializing a request object to JSON or deserializing
the JSON returned by a function to the expected result object.
|
Annotation Type | Description |
---|---|
LambdaFunction |
An annotation that marks methods of an interface that are meant to be proxied to remote code
running on AWS Lambda.
|
Step 1: Model your function's input and/or output as a set of Java POJOs and/or Exceptions.
public class AddRequest {
private final int leftHandSide;
private final int rightHandSide;
public AddRequest(int leftHandSide, int rightHandSide) {
this.leftHandSide = leftHandSide;
this.rightHandSide = rightHandSide;
}
public int getLeftHandSide() {
return leftHandSide;
}
public int getRightHandSide() {
return rightHandSide;
}
}
public class AddResult {
private int sum;
public int getSum() {
return sum;
}
public void setSum(int sum) {
this.sum = sum;
}
}
public class OverflowException extends LambdaFunctionException {
public AddException(String message) {
super(message, true, "Overflow");
}
}
Input types will be automatically converted to JSON to pass to your Lambda function. The JSON response from your function will be converted to the corresponding result type.
Step 2: Create an interface representing your function(s).
public interface CloudAdder {
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.