I've a simple java code that performs some queries agains a DynamoDB database. In the lambda function I've tested each method (handler) individually with success.
public class EmployeeDataHandler {
public String addSingleEmployeeData(Object input, Context context) {
// logic inside
}
public String addBulkEmployeeData(List<Object> inputObjectList, Context context) {
// logic inside
}
public List<EmployeeItems> getAllItemsByDate(EmployeeItems input, Context context) {
// logic inside
}
public List<EmployeeItems> getAllItemsByDateAndId(EmployeeItems input, Context context) {
// logic inside
}
public List<EmployeeItems> getAllItemsByDateRange(EmployeeItems input, Context context) {
// logic inside
}
}
The next step is to call a given handler (for instance, addBulkEmployeeData) in a Task step function part of a state machine.
My question is how do I manage to do that?
According to the documentation, I can only reference the lambda function "ARN" throught the field Resource:
{
"Comment": "Basic example of the Amazon States Language using an AWS Lambda function",
"StartAt": "TestState",
"States": {
"TestState": {
"Type": "Task",
"Resource": "arn:aws:lambda:eu-central-1:11111111111111:function:java-test-lambda",
"End": true
}
}
}
Thus, anyone knows how can I call a specific handler (eg. addBulkEmployeeData)?
Tks in advance for your kindness and support.