Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

todoDB

install and build

npm install

deploy to local

create local dynamoDB with docker

docker run -d --name dynamodb -p 8000:8000 peopleperhour/dynamodb

local deploy will create your tables in local dynamoDB instance

functionly deploy local

run in local

functionly start

then test it

curl -d '@content/todoPayload.json' -H "Content-Type: application/json" -X POST http://localhost:3000/createTodo
curl 'http://localhost:3000/getAllTodos'

deploy to aws

create and setup your AWS IAM role (Lambda execution, dynamo table access)

functionly deploy

it will create lambda functions and dynamoDB tables

run in aws

aws lambda invoke --function-name CreateTodo-dev --payload file://./content/todoPayload.json --region us-east-1 `tty`
aws lambda invoke --function-name GetAllTodos-dev --region us-east-1 `tty`