https://github.com/nicpuppa/aws-java-doctor-api
A simple tutorial on serverless framework, AWS SAM to create REST API in Java
https://github.com/nicpuppa/aws-java-doctor-api
aws java serverless
Last synced: about 1 year ago
JSON representation
A simple tutorial on serverless framework, AWS SAM to create REST API in Java
- Host: GitHub
- URL: https://github.com/nicpuppa/aws-java-doctor-api
- Owner: nicpuppa
- Created: 2021-01-12T12:13:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-25T07:19:58.000Z (over 3 years ago)
- Last Synced: 2025-01-22T12:14:51.384Z (about 1 year ago)
- Topics: aws, java, serverless
- Language: Java
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Serverless REST API in Java/Maven using DynamoDB
## Install Pre-requisites:
- `node` and `npm`
- Install JDK from [Oracle JDK](https://www.oracle.com/java/technologies/javase-downloads.html)
- Install [Apache Maven](https://maven.apache.org/)
- Install and configure [AWS CLI](https://docs.aws.amazon.com/it_it/cli/latest/userguide/install-cliv2.html)
- Install [Serverless](https://www.serverless.com/) framework:
```
npm install -g serverless
```
## Build the Java Project
```
mvn clean install
```
## Deploy the serverless app
```
sls deploy
....
None
endpoints:
GET - https://xxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/doctors
GET - https://xxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/doctors/{id}
POST - https://xxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/doctors
DELETE - https://xxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/doctors/{id}
......
```
## Removing the services
```
sls remove
```