-
Notifications
You must be signed in to change notification settings - Fork 5
/
app.template.yml
48 lines (45 loc) · 1.3 KB
/
app.template.yml
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
47
48
AWSTemplateFormatVersion: 2010-09-09
Transform: AWS::Serverless-2016-10-31
Resources:
TweetProcessor:
Type: AWS::Serverless::Function
Properties:
Runtime: java8
CodeUri: target/retweet-leaderboard-1.0.4-SNAPSHOT.jar
Handler: com.jlhood.retweetcounter.lambda.TweetProcessorHandler::handleRequest
Tracing: Active
MemorySize: 512
Timeout: 60
Policies:
- DynamoDBCrudPolicy:
TableName: !Ref Leaderboard
Environment:
Variables:
LEADERBOARD_TABLE_NAME: !Ref Leaderboard
GetLeaderboard:
Type: AWS::Serverless::Function
Properties:
Runtime: java8
CodeUri: target/retweet-leaderboard-1.0.4-SNAPSHOT.jar
Handler: com.jlhood.retweetcounter.lambda.GetLeaderboardHandler::handleRequest
Tracing: Active
MemorySize: 512
Timeout: 60
Policies:
- DynamoDBCrudPolicy:
TableName: !Ref Leaderboard
Environment:
Variables:
LEADERBOARD_TABLE_NAME: !Ref Leaderboard
Events:
GetLeaderboardApi:
Type: Api
Properties:
Path: /leaderboard
Method: get
Leaderboard:
Type: AWS::Serverless::SimpleTable
Properties:
ProvisionedThroughput:
ReadCapacityUnits: 10
WriteCapacityUnits: 10