I need to create a Java Lambda Handler to start and stop rds instances for AWS. Very confused on how to do this since most of the online resources are in python. I took a look at the AWS Java SDK to see what functions I need to use (startDBInstance, stopDBInstance), but am unsure how to implement them properly as this is my first time doing so.
This is the outline of the Handler.
package com.example.lambda.demo;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestHandler;
public class Hello implements RequestHandler<Object, String> {
@Override
public String handleRequest(Object input, Context context) {
context.getLogger().log("Input: " + input);
// TODO: implement your handler
return "Hello from Lambda";
}
}