Name Last Update
aggregation-service Loading commit data...
ingestion-service Loading commit data...
reporting-service Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data... Loading commit data...
heartbeat-template.yaml Loading commit data...
pom.xml Loading commit data...

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:

Build & Deploy

Use the following steps to build & deploy a stack:

install and configure AWS CLI (note: the DAO tests that run during the build currently assume "eu-west-1" region)

build the code using maven - this will also run build tests

mvn clean install

create S3 bucket

aws s3 mb s3://<bucket-name>

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 <bucket-name>

Due to a bug in the AWS CLI (, it is required to manually remove the BodyS3Location tag from ServerlessRestApi definition in the resulting heartbeat-template-output.yaml before the next step.

deploy the stack in CF using AWS CLI

aws cloudformation deploy --stack-name <stack-name> --template heartbeat-template-output.yaml --capabilities CAPABILITY_IAM

show details of stack after deployment

aws cloudformation describe-stacks --stack-name <stack-name>

Call the API

Obtain the API's invoke url (top-level entrypoint):

either from the AWS console

or construct yourself (hint: use aws apigateway get-rest-apis to find the restapi_id for given (api/stack) name)


Send some heartbeat data:

use postman or curl. Here's an example with fake data:

curl -X POST -d '{"repositoryId":"a1d48b32-8309-5c65-acdb-7202c8cd2f9e","feature":"Alfresco Content Services", "payload":{"users":"100","documents":"10000"}, "version":"6.0.0"}'

Get the report on the repo ID:



Later, you can use the following steps to delete a stack:

delete the stack using CF cli

aws cloudformation delete-stack --stack-name <stack-name>

check progress of stack deletion

aws cloudformation describe-stacks --stack-name <stack-name>

Build plan

Please, visit

The build has a deployment stage which can deploy a stack on Amazon. It is required to override the following variables: and