Name Last Update
src Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
README.md Loading commit data...
heartbeat-template.yaml Loading commit data...
pom.xml Loading commit data...

README.md

Serverless Heartbeat

Overview

The project contain a lambda (HeartbeatRequestHandler) which writes the received data to DynamoDB. The request and response objects are build according to the docs: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-proxy.html#api-gateway-simple-proxy-for-lambda-input-format

Usage

Use the following steps to deploy a stack (aws cli should be installed and configured):

  • build the code using maven: ~~~ mvn clean nstall ~~~
  • create S3 bucket: ~~~ aws s3 mb s3:// ~~~
  • package the template and upload the jar to the bucket: ~~~ aws cloudformation package --template-file heartbeat-template.yaml --output-template-file heartbeat-template-output.yaml --s3-bucket ~~~
  • deploy the stack in CF: ~~~ aws cloudformation deploy --stack-name --template heartbeat-template.yaml --capabilities CAPABILITY_IAM ~~~