-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserverless.yml
39 lines (35 loc) · 1.06 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
service: serverless-TodaysAbsences
provider:
name: aws
profile: default
runtime: dotnet6
architecture: arm64
stage: ${opt:stage, 'stage'}
region: eu-west-1
timeout: 60
memorySize: 1024
environment:
BOB_API_URL: ${ssm:/todays-absences/${self:provider.stage}/BOB_API_URL}
BOB_API_USERNAME: ${ssm:/todays-absences/${self:provider.stage}/BOB_API_USERNAME}
BOB_API_PASSWORD: ${ssm:/todays-absences/${self:provider.stage}/BOB_API_PASSWORD}
SLACK_WEBHOOK_URL: ${ssm:/todays-absences/${self:provider.stage}/SLACK_WEBHOOK_URL}
BIRTHDAY_OPT_INS: ${ssm:/todays-absences/${self:provider.stage}/BIRTHDAY_OPT_INS}
iamRoleStatements:
- Effect: "Allow"
Action:
- "logs:CreateLogGroup"
- "logs:CreateLogStream"
- "logs:PutLogEvents"
Resource: "*"
custom:
events:
stage: []
prod:
# GMT TIME
- schedule: cron(0 9 ? * MON-FRI *)
package:
artifact: package.zip
functions:
SendAbsencesMessage:
handler: TodaysAbsences::Handlers::SendAbsencesMessage
events: ${self:custom.events.${self:provider.stage}}