Config API Gateway

Next, we’ll set up the API Gateway to interact with the Lambda functions created in the previous section:

  1. Open API Gateway console

CreateRestAPI

  1. Scroll down and click Build of REST API pattern

CreateRestAPI

  1. Click OK

CreateRestAPI

  1. Select REST for Protocol
  • Select New API to create a new API
  • Enter REST API name, such as: fcj-serverless-api
  • Click Create API

CreateRestAPI

  1. Click on the API just created

CreateRestAPI

  1. Click Actions, then select Create resource

CreateRestAPI

  1. Enter resource name, such as: books
  • Then click Create Resource

CreateRestAPI

So we have created a new REST API and resource for it. Next, we will create methods to interact with Lambda functions and set them:

  1. Create methods
  2. Setting and enable CORS