How To Build a Serverless API With DynamoDB, AWS Lambda, and API Gateway
AWS all the things!
Published in
9 min readOct 22, 2019
Last week I wrote a guide to building a simple Serverless API . This piece goes into more depth by building a fully functional Serverless CRUD API that utilises DynamoDB. In this guide, we’ll build an API that has the following operations:
GET /books
POST /books
GET /books/{id}
PUT /books/{id}
DELETE /books/{id}
This tutorial will use mainly use the AWS User Interface. If you want to read a guide on how to build this app with Infrastructure as Code, please see my article here.
Technologies Used
This guide uses the following technologies:
- AWS Lambda for running code without provisioning servers
- AWS API Gateway for Serverless API creation & management
- AWS Identity and Access Management (IAM) for creating a role for the Lambda functions we will build
- AWS DynamoDB for a managed NoSQL database
Database Setup
Log in to AWS and navigate to the DynamoDB service. Then click Create table: