Programming Model for Authoring Lambda Functions in Java
The following sections explain how common programming patterns and core concepts apply when authoring Lambda function code in Java.
Additionally, note that AWS Lambda provides the following libraries:
aws-lambda-java-core – This library provides the Context object,
RequestStreamHandler, and the
Contextobject (The Context Object (Java)) provides runtime information about your Lambda function. The predefined interfaces provide one way of defining your Lambda function handler. For more information, see Leveraging Predefined Interfaces for Creating Handler (Java).
aws-lambda-java-events – This library provides predefined types that you can use when writing Lambda functions to process events published by Amazon S3, Amazon Kinesis, Amazon SNS, and Amazon Cognito. These classes help you process the event without having to write your own custom serialization logic.
These libraries are available through the Maven Central Repository and can also be found on GitHub.