-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
58 lines (52 loc) · 1.59 KB
/
serverless.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
49
50
51
52
53
54
55
56
57
58
service: app-monitoring-archiver
frameworkVersion: ^3.36.0
provider:
name: aws
runtime: provided.al2
timeout: 600
versionFunctions: false
memorySize: 128
logRetentionInDays: 14
tags:
managed_by: serverless
itse_app_name: ${self:custom.app_name}
itse_app_customer: ${self:custom.customer}
itse_app_env: production
stackTags:
name: cloudformation_stack-${self:custom.app_name}-${self:custom.customer}-production
deploymentBucket:
tags:
name: s3_bucket-${self:custom.app_name}-${self:custom.customer}-production
environment:
namespace: ${self:custom.namespace}
NODEPING_TOKEN: ${env:NODEPING_TOKEN}
GOOGLE_AUTH_CLIENT_EMAIL: ${env:GOOGLE_AUTH_CLIENT_EMAIL}
GOOGLE_AUTH_PRIVATE_KEY_ID: ${env:GOOGLE_AUTH_PRIVATE_KEY_ID}
GOOGLE_AUTH_PRIVATE_KEY: ${env:GOOGLE_AUTH_PRIVATE_KEY}
GOOGLE_AUTH_TOKEN_URI: ${env:GOOGLE_AUTH_TOKEN_URI}
custom:
prod:
# cron(Minutes Hours Day-of-month Month Day-of-week Year)
schedule: cron(30 3 1 * ? *)
dev:
schedule: cron(40 14 1,20 * ? *)
namespace: ${self:service}_${sls:stage}
app_name: app-monitoring-archiver
customer: gtis
package:
patterns:
- '!./**'
- './bootstrap'
functions:
archiveToGoogleSheets:
handler: bootstrap
events:
- schedule:
rate: ${self:custom.${sls:stage}.schedule}
input:
ContactGroupName: ${env:CONTACT_GROUP_NAME}
CountLimit: ${env:COUNT_LIMIT}
Period: ${env:PERIOD}
SpreadSheetID: ${env:SPREADSHEET_ID}
tags:
name: lambda_function-${self:custom.app_name}-${self:custom.customer}-production