Create methods
Create list API
- Click Actions, then select Create method
- Select GET method
- Click to “check” icon
- Select Lambda Function for Integration type
- Check to Use Lambda Proxy integration
- Enter Lambda function name to be integrated: books_list
- Click Save
- Click OK
Create write API
- Click Actions, then select Create method
- Select POST method
- Select Lambda Function for Integration type
- Check to Use Lambda Proxy integration
- Enter Lambda function name to be integrated: book_create
- Click Save
- Click OK
Create delete API
- Click Actions, then select Create Resource
- Enter id for Resource name pattern
- Enter {id} for Resource path pattern
- Click Create Resource
- Click Actions, then select Create method
- Select method DELETE
- Select Lambda Function for Integration type
- Check to Use Lambda Proxy integration
- Enter Lambda function name to be integrated: book_delete
- Click Save
- Click OK
So, we have created the APIs that interact with Lambda functions.