{"id":29735726,"url":"https://github.com/nireekshshetty/serverless-spring-api","last_synced_at":"2026-04-10T20:44:38.205Z","repository":{"id":306298207,"uuid":"1025714018","full_name":"nireekshshetty/serverless-spring-api","owner":"nireekshshetty","description":"A client (like Postman, browser, or frontend app) sends HTTP requests to API Gateway, which routes them to an AWS Lambda function that runs a Spring Boot app using Spring Cloud Function. This Lambda function processes the request and returns the appropriate response via API Gateway.","archived":false,"fork":false,"pushed_at":"2025-07-24T17:47:08.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-24T22:52:04.361Z","etag":null,"topics":["api-gateway","aws","lambda","serverless","springboot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nireekshshetty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-24T17:20:27.000Z","updated_at":"2025-07-24T17:47:12.000Z","dependencies_parsed_at":"2025-07-24T22:52:08.368Z","dependency_job_id":"7a03fd49-b450-4f02-8ce1-2839bf0655b1","html_url":"https://github.com/nireekshshetty/serverless-spring-api","commit_stats":null,"previous_names":["nireekshshetty/serverless-spring-api"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/nireekshshetty/serverless-spring-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nireekshshetty%2Fserverless-spring-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nireekshshetty%2Fserverless-spring-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nireekshshetty%2Fserverless-spring-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nireekshshetty%2Fserverless-spring-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nireekshshetty","download_url":"https://codeload.github.com/nireekshshetty/serverless-spring-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nireekshshetty%2Fserverless-spring-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267015579,"owners_count":24021570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-gateway","aws","lambda","serverless","springboot"],"created_at":"2025-07-25T14:00:50.485Z","updated_at":"2026-04-10T20:44:33.159Z","avatar_url":"https://github.com/nireekshshetty.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌀 Serverless Spring Boot REST API (Java 21 + AWS Lambda + API Gateway)\n\nA serverless REST API built using **Spring Boot 3** and deployed as an **AWS Lambda function** behind an **API Gateway**. This project demonstrates how to run a modern Spring Boot app in a fully serverless architecture without managing any servers.\n\n---\n\n## 🚀 Project Overview\n\nThis project adapts a Spring Boot 3 application using **Spring Cloud Function** so it can run inside AWS Lambda. The API is exposed to the internet via **API Gateway**, making it suitable for stateless, cost-efficient backend services.\n\n---\n\n## ⚙️ Tech Stack\n\n- Java 21\n- Spring Boot 3\n- Spring Cloud Function\n- AWS Lambda\n- API Gateway\n- Maven\n- (Optional) AWS SAM for deployment\n\n---\n\n## 🧠 How the Project Works\n\n\u003e A **client** (like a browser, Postman, or frontend app) sends HTTP requests to **API Gateway**, which forwards the request to an **AWS Lambda function** running the **Spring Boot** application. The function handles the request and sends back a response via API Gateway.\n\n### 🔄 Request Flow:\n\n```\n\nClient → API Gateway → AWS Lambda (Spring Boot) → Response\n\n````\n\n---\n\n## 📦 API Endpoints (Example)\n\n| Method | Endpoint         | Description               |\n|--------|------------------|---------------------------|\n| GET    | `/courses`       | Fetch list of courses     |\n| POST   | `/courses`       | Add a new course          |\n| PUT    | `/courses/{id}`  | Update a course by ID     |\n| DELETE | `/courses/{id}`  | Delete a course by ID     |\n\n\n\n---\n\n## 📁 Project Structure\n\n```bash\nserverless-spring-api/\n├── src/\n│   └── main/java/\n│       └── com/example/serverless/\n│           ├── handler/                # Lambda function handlers\n│           ├── model/                  # Data models (DTOs)\n│           ├── service/                # Business logic (optional)\n│           ├── config/                 # AWS-related config\n│           └── ServerlessApplication.java  # Spring Boot main class\n│\n├── pom.xml                   # Maven dependencies and build setup\n├── template.yaml             # AWS SAM template (if using SAM)\n├── README.md                 # Project documentation\n````\n\n---\n\n## 🧪 Run Locally\n\nYou can test the Spring Boot app locally (optional):\n\n```bash\nmvn spring-boot:run\n```\n\n---\n\n## 🚀 Deployment Options\n\n### Option 1: Manual Upload via AWS Console\n\n1. Package the project:\n\n   ```bash\n   mvn clean package\n   ```\n2. Go to AWS Lambda console, create a new function (Java 21), and upload the JAR.\n3. Set the handler as:\n\n   ```\n   org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest\n   ```\n\n### Option 2: Deploy Using AWS SAM (Recommended)\n\n1. Install AWS CLI \u0026 AWS SAM CLI\n2. Build \u0026 deploy:\n\n   ```bash\n   sam build\n   sam deploy --guided\n   ```\n\n---\n\n## 📊 Logs \u0026 Monitoring\n\nUse AWS CloudWatch to view logs:\n\n```bash\naws logs tail /aws/lambda/\u003cyour-function-name\u003e --follow\n```\n\n---\n\n## 👨‍💻 Author\n\n**Nireeksh**\nJava Backend Developer | Cloud \u0026 DevOps Enthusiast\n[GitHub](https://github.com/nireekshshetty)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnireekshshetty%2Fserverless-spring-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnireekshshetty%2Fserverless-spring-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnireekshshetty%2Fserverless-spring-api/lists"}