From the course: Java: Serverless Applications on AWS
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Understand different Lambda inputs and outputs
From the course: Java: Serverless Applications on AWS
Understand different Lambda inputs and outputs
- [Instructor] When Lambda is executed, it always passes some input and returns the output. In this lesson, we will cover various inputs and outputs to and from your Lambda function. As you have already seen, every Lambda function requires a handler method that processes events. The events can come in different shapes and forms, and this is where customizing inputs makes sense. In the hello world example, the event was mapped to API specific request object that comes from the AWS SDK. The Lambda runtime receives an event as JSON format stream and converts it into an object. If you define your own input's type, each should be a deserializable, mutable, plain old Java object, POJO, with the default constructor and properties for each field in the event. As an input, optionally, we can include a context object, which is out of field by AWS Lambda execution environment, which provides information about the invocation.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.