diff --git a/src/main/resources/heartbeat-template.yaml b/src/main/resources/heartbeat-template.yaml new file mode 100644 index 0000000..fd8f2ba --- /dev/null +++ b/src/main/resources/heartbeat-template.yaml @@ -0,0 +1,44 @@ +AWSTemplateFormatVersion: '2010-09-09' +Transform: 'AWS::Serverless-2016-10-31' +Description: An AWS Serverless Heartbeat receiver +Resources: + Heartbeat: + Type: 'AWS::Serverless::Function' + Properties: + Handler: org.alfresco.heartbeat.handler.HeartbeatRequestHandler + Runtime: java8 + Description: 'Heartbeat receiver' + MemorySize: 512 + Timeout: 15 + CodeUri: s3://alfresco-heartbeat/heartbeat-2.0-SNAPSHOT.jar + Policies: + - AmazonDynamoDBFullAccess + - AmazonS3ReadOnlyAccess + Events: + PostRequest: + Type: Api + Properties: + Path: / + Method: post + + Table: + Type: AWS::DynamoDB::Table + Properties: + KeySchema: + - + AttributeName: "repositoryId" + KeyType: "HASH" + - + AttributeName: "repositoryVersion" + KeyType: "RANGE" + AttributeDefinitions: + - + AttributeName: 'repositoryId' + AttributeType: 'S' + - + AttributeName: 'repositoryVersion' + AttributeType: 'S' + TableName: 'heartbeat' + ProvisionedThroughput: + ReadCapacityUnits: "5" + WriteCapacityUnits: "5"