-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yml
33 lines (33 loc) · 941 Bytes
/
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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Compute maintainer payouts and push a payout item onto maintainer payouts ledger
Parameters:
MongoUri:
Type: AWS::SSM::Parameter::Value<String>
Default: '/api/db/mongo_uri'
Resources:
ComputeMaintainerPayoutsFunction:
Type: AWS::Serverless::Function
Properties:
Timeout: 840
Handler: index.handler
Runtime: nodejs12.x
CodeUri: ./
Events:
CMPSchedule:
Type: Schedule
Properties:
Description: Every 22 hrs
Name: ComputeMaintainerPayoutsSchedule
Enabled: true
Schedule: rate(22 hours)
Policies:
- Statement:
- Effect: Allow
Action:
- 'kms:Decrypt'
- 'kms:ListKeys'
Resource: '*'
Environment:
Variables:
MONGO_URI: !Ref MongoUri