Create methods

Create list API

  1. Click Actions, then select Create method

CreateListAPI

  1. Select GET method

CreateRestAPI

  1. Click to “check” icon

CreateRestAPI

  1. Select Lambda Function for Integration type
  • Check to Use Lambda Proxy integration
  • Enter Lambda function name to be integrated: books_list
  • Click Save

CreateRestAPI

  1. Click OK

CreateRestAPI

Create write API

  1. Click Actions, then select Create method

CreateListAPI

  1. Select POST method
  • Click to “check” icon

CreateRestAPI

  1. Select Lambda Function for Integration type
  • Check to Use Lambda Proxy integration
  • Enter Lambda function name to be integrated: book_create
  • Click Save

CreateRestAPI

  1. Click OK

CreateRestAPI

Create delete API

  1. Click Actions, then select Create Resource

CreateListAPI

  1. Enter id for Resource name pattern
  • Enter {id} for Resource path pattern
  • Click Create Resource

CreateRestAPI

  1. Click Actions, then select Create method

CreateListAPI

  1. Select method DELETE
  • Click to “check” icon

CreateRestAPI

  1. Select Lambda Function for Integration type
  • Check to Use Lambda Proxy integration
  • Enter Lambda function name to be integrated: book_delete
  • Click Save

CreateRestAPI

  1. Click OK

CreateRestAPI

So, we have created the APIs that interact with Lambda functions.