Spring Boot REST API integrated with AWS Lambda and DynamoDB for a fully serverless order CRUD system.
A serverless Spring Boot application deployed on AWS Lambda that connects to Amazon DynamoDB for orders crud API.
This project demonstrates how to build scalable, event-driven APIs with Spring Boot and AWS services using best practices.
- Spring Boot REST APIs
- AWS Lambda (using
aws-serverless-java-container) - DynamoDB integration with
DynamoDBMapper - CRUD operations for restaurant orders
- Custom exception handling
- Response wrapper (
ResponseDTO) - Serverless deployment via AWS Console
[API Gateway] → [AWS Lambda (Spring Boot)] → [DynamoDB]
- API Gateway exposes REST endpoints.
- AWS Lambda runs the Spring Boot application.
- DynamoDB stores order data.
- The app uses
DynamoDBMapperfor object persistence.
src/ ├── main/ │ ├── java/com/sample/order/ │ │ ├── config/ # Dynamo Db Config │ │ ├── controller/ # REST Controllers │ │ ├── service/ # Business Logic │ │ ├── model/ # Entity Classes │ │ ├── dto/ # Response DTOs │ │ ├── exception/ # Custom Exceptions │ │ └── OrderApplication.java # Lambda Entry Point │ │ └── StreamLambdaHandler.java # Lambda Entry Point │ └── resources/ │ ├── application.properties └── test/ # Unit Tests
aws.dynamodb.access-key=YOUR_ACCESS_KEY
aws.dynamodb.secret-key=YOUR_SECRET_KEY
aws.dynamodb.region=YOUR_REGION
aws.dynamodb.endpoint=ENDPOINT