An open API service indexing awesome lists of open source software.

https://github.com/jayakrishnan-mk/serverless-api-dynamodb

AWS Lambda for backend compute , API Gateway for REST endpoints , DynamoDB for NoSQL storage
https://github.com/jayakrishnan-mk/serverless-api-dynamodb

aws aws-lambda awssam backend-development cloudcomputing crud-api dynamodb nodejs serverless

Last synced: 2 months ago
JSON representation

AWS Lambda for backend compute , API Gateway for REST endpoints , DynamoDB for NoSQL storage

Awesome Lists containing this project

README

          

# CRUD DynamoDB Serverless App

This project is a complete Serverless CRUD API built using **AWS SAM (Serverless Application Model)**, **Node.js**, and **DynamoDB**. It's designed for learning and demo purposes, showcasing how to build, test, and deploy a serverless backend on AWS.

---

## โœ… Features

- Create, Read, Update, Delete (CRUD) APIs
- Powered by **AWS Lambda**, **API Gateway**, and **DynamoDB**
- Local testing with `sam local`
- Deployed using `sam deploy --guided`

---

## ๐Ÿ“ Project Structure

```
.
โ”œโ”€โ”€ src/ # Lambda function handlers
โ”œโ”€โ”€ events/ # Sample event payloads for testing
โ”œโ”€โ”€ template.yaml # SAM template to define AWS infrastructure
```

---

## ๐Ÿš€ Deploy the Application

### Prerequisites

- [Node.js 20+](https://nodejs.org/en/)
- [Docker](https://www.docker.com/products/docker-desktop/)
- [AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html)

### Build and Deploy

```bash
sam build
sam deploy --guided
```

Youโ€™ll be prompted to enter:
- Stack name (e.g., `crud-dynamo-app`)
- Region
- Permission to create IAM roles
- Save config for future runs

---

## ๐Ÿงช Test Locally with SAM

```bash
sam local invoke putItemFunction --event events/event-post-item.json
sam local invoke getAllItemsFunction --event events/event-get-all-items.json
sam local start-api # run local dev server at http://localhost:3000/
```

---

## ๐Ÿ“š Resources

- [AWS SAM Developer Guide](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html)
- [Serverless Application Repository](https://aws.amazon.com/serverless/serverlessrepo/)

---

## ๐Ÿ™Œ Project Status

โœ… **Done!**
This project was successfully built and deployed using AWS SAM, showcasing a functional CRUD API with DynamoDB and Lambda.