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

https://github.com/kmponis/aws-serverless-kotlin

An Lambda REST API connected to DynamoDB using Kotlin
https://github.com/kmponis/aws-serverless-kotlin

aws-serverless cloudformation dynamodb kotlin lambda

Last synced: about 2 months ago
JSON representation

An Lambda REST API connected to DynamoDB using Kotlin

Awesome Lists containing this project

README

          

# AWS-SERVERLESS-KOTLIN
An AWS serverless Kotlin project to save and retrieve 'Post' from DynamoDB

### Included endpoints
* get: /, no params
* post: /insertPost, params(title, description, username, email)
* get: /getAllPosts, no params
* get: /getPostById, params(id)
* get: /getPostByTitle, params(title)
* get: /getPostByUsername, params(username)

### Osiris plugin
* The project was created using the bellow command.

`$ mvn archetype:generate -DarchetypeGroupId=ws.osiris -DarchetypeArtifactId=osiris-archetype -DarchetypeVersion=1.4.0`
* The bellow prerequisites were needed:

- JDK8, Maven and Git

- An AWS account.

- An AWS user with administrator permissions, access key and secret access key.

- Added access key and secret access key to system environments. Add following lines to .bash_profile.

`export AWS_ACCESS_KEY_ID=""`

`export AWS_SECRET_ACCESS_KEY=""`

`export AWS_REGION=""`
* Build and Deploy

`mvn deploy`

### Git examples
* https://github.com/cjkent/osiris/wiki/Getting-Started-with-Maven
* https://github.com/cjkent/osiris-examples/tree/master/dynamodb
* https://gist.github.com/gaplo917/a4298d755c076b1a295026ed9b3521fa