In this recipe, we will configure our API to act as a proxy for a Lambda. We will create a new Lambda function that extracts the required data from the incoming request. While using proxy integration, Lambda needs to implement the low-level RequestStreamHandler that gives us access to the InputStream and OutputStream.
Lambda and API with proxy integration
Getting ready
You need an active AWS account. You need to follow the section Getting started in the recipes Your first AWS Lambda and Your first Lambda with AWS CLI from Chapter 1, Getting Started with Serverless Computing on AWS to set up Java, Maven, the parent project, serverless-cookbook-parent-aws-java, and AWS CLI, and may also read other notes there including code...