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

  2. Scroll down and click Build of REST API pattern CreateRestAPI

  3. Select REST for Protocol

    • Select New API to create a new API
    • Enter REST API name, such as: fcj-serverless-api
    • For API enpoint type: choose Regional
    • Click Create API CreateRestAPI
  4. Click on the API just created, then select Create resource CreateRestAPI

  5. 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