Setting up a new resource and method

Now, it's time to set up a new resource and GET method in API Gateway. This time, we'll select Lambda Function as the Integration type. Also, we will want to check Use Lambda Proxy integration. The reason for choosing this now is that we can control details of the response from our application code run by Lambda. If there is a need to update headers or otherwise transform the response, we simply update our application code and redeploy the Lambda function:

Select the already deployed Lambda function, click Save, and we're all done. There is no need to update the Method Request or Integration since we may ...

Get Serverless Design Patterns and Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.