heartbeat-template.yaml
1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: An AWS Serverless Heartbeat receiver
Resources:
HeartbeatLambda:
Type: AWS::Serverless::Function
Properties:
Handler: org.alfresco.heartbeat.handler.HeartbeatRequestHandler
Runtime: java8
Description: 'Heartbeat lambda'
MemorySize: 512
Timeout: 15
CodeUri: ./target/heartbeat-2.0-SNAPSHOT.jar
Policies:
- AmazonDynamoDBFullAccess
Environment:
Variables:
TABLE_NAME:
Ref: Table
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'
ProvisionedThroughput:
ReadCapacityUnits: "5"
WriteCapacityUnits: "5"