Create Methods
Create GET API (List)
-
Select /books resource, then click Create method

-
On Create method page:
- Select method GET
- Select Lambda function for Integration type
- Check Lambda proxy integration
- Enter Lambda function name: books_list
- Click Create method

-
Review the information and click Create method

-
Method GET created successfully. Continue to create POST method by clicking Create method

Create POST API (Write)
-
On Create method page:
- Select method POST
- Select Lambda function for Integration type
- Check Lambda proxy integration
- Enter Lambda function name: book_create
- Click Create method

-
Review the information and click Create method

-
Method POST created successfully. Continue to create {id} resource for delete API
- Click Create resource

Create DELETE API
-
On Create resource page:
- Select /books for Resource path
- Enter {id} for Resource name
- Click Create resource

-
Resource /{id} created. Select this resource and click Create method

-
On Create method page:
- Select method DELETE
- Select Lambda function for Integration type
- Check Lambda proxy integration
- Enter Lambda function name: book_delete
- Click Create method

-
Review the information and click Create method

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