-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yml
35 lines (35 loc) · 1 KB
/
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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Schedule maintainer payouts by sending an sqs event to our lambda which will distribute payouts
Parameters:
MongoUri:
Type: AWS::SSM::Parameter::Value<String>
Default: '/api/db/mongo_uri'
Resources:
ScheduleMaintainerPayoutsFunction:
Type: AWS::Serverless::Function
Properties:
Timeout: 240
Handler: index.handler
Runtime: nodejs12.x
CodeUri: ./
Events:
StartScheduleEvent:
Type: Schedule
Properties:
Name: MaintainerPayoutSchedule
Description: Every day at 1 am
Enabled: true
Schedule: cron(0 1 * * ? *)
Policies:
- AmazonSQSFullAccess
- AmazonDynamoDBFullAccess
- Statement:
- Effect: Allow
Action:
- 'kms:Decrypt'
- 'kms:ListKeys'
Resource: '*'
Environment:
Variables:
MONGO_URI: !Ref MongoUri