924 Bytes

Serverless Heartbeat


The project contain a lambda (HeartbeatRequestHandler) which writes the received data to DynamoDB. The request and response objects are build according to the docs:


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 ~~~