Skip to content

Simple Key Value database with S3 as storage and AWS Lambda as processor

Notifications You must be signed in to change notification settings

skojin/aws-lambda-s3-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lambda-S3-DB

Simple Key-Value database with HTTP endpoints. Build on AWS Lambda and AWS S3 as storage. Main goal to have ability to store value visit browser link.

API

GET /ADD/folder-key-name?v=value-text - add to S3 folder with timestamp as name
POST /ADD/folder-key-name - value from request body

GET /KEYS/folder-key-name - return ["object-key1", "object-key2"] in JSON format

GET /LIST/folder-key-name - return [{"k": "object-key1", "v": "value-text1"}, ..] in JSON format

GET /GET/object-key - get value
Status code 404 if key not found

GET /SET/object-key?v=value-text - create or update value (Key-Value)
POST /SET/object-key - value from request body

GET /DEL/object-key - delete 

Install

{
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "s3:ListAllMyBuckets",
            "Resource": "arn:aws:s3:::*"
        },
        {
            "Effect": "Allow",
            "Action": "s3:*",
            "Resource": [
                "arn:aws:s3:::MY-BUCKET-NAME",
                "arn:aws:s3:::MY-BUCKET-NAME/*"
            ]
        }
    ]
}
curl -s https://RANDOM.execute-api.us-east-1.amazonaws.com/latest/SET/test?v=hello
# ok
curl -s https://RANDOM.execute-api.us-east-1.amazonaws.com/latest/GET/test
# hello

About

Simple Key Value database with S3 as storage and AWS Lambda as processor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published