In previous chapters, we looked at how to build standalone, event-based Lambda functions. Lambda functions were code pieces living in the cloud that respond to different events, such as a new file in S3 bucket or an SNS notification, such as what we will see in following chapters. However, at this stage, maybe our simplest requirements would be to invoke the lambda function with an HTTP request, thus having a fully serverless REST API.
Thanks to API Gateway, it is possible to create a REST API that responds to HTTP requests. API Gateway replaces servlets, servlet containers, application servers, and basically the HTTP layer. When a request arrives at API Gateway, it decides where to route this request, transforms the input, invokes the "backend", and sends back the response to the client.
API Gateway can proxy to many types of backends, and it can be configured...