title: How do I define a function for AWS Lambda to start in Java?
body: <p>I'm using this doc as a tutorial
  <a href="http://docs.aws.amazon.com/lambda/latest/dg/get-started-step4-optional.html" rel="nofollow noreferrer">http://docs.aws.amazon.com/lambda/latest/dg/get-started-step4-optional.html</a></p>
  
  <p>The entry method/function that they supply for AWS lamda looks like this:</p>
  
  <pre><code>public String myHandler(int myCount, Context context) {
      LambdaLogger logger = context.getLogger();
      logger.log("received : " + myCount);
      return String.valueOf(myCount);
  }
  </code></pre>
  
  <p><strong>My issue is that I don't know what arguments I can define and how AWS lambda knows what to pass to me.</strong> It'd be great to see all potential method signatures I could come up with. Maybe I'm just not looking in the right place for this documentation, but I'd love to be able to do something like</p>
  
  <pre><code>public String myHandler(String json) {
     MyJsonValidatorClass validator = new ...;
  boolean isValid = validator.isValidJson(json);
      return String.valueOf(isValid);
  }
  </code></pre>
  
  <p>I'm just not sure what I'm able to do in AWS Lamdas really. When writing a java main application, I know that I have String[] args to deal with and nothing else. Am I missing something here? Or am I just thinking about this totally wrong?</p>