-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
61 lines (53 loc) · 1.22 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
59
60
61
service: icalendar-bot
provider:
name: aws
runtime: ruby2.7
stage: ${opt:stage, 'dev'}
region: eu-central-1
memorySize: 128
timeout: 7
iamRoleStatements:
- Effect: "Allow"
Action:
- "dynamodb:GetItem"
- "dynamodb:CreateTable"
- "dynamodb:PutItem"
- "dynamodb:UpdateItem"
- "dynamodb:DeleteItem"
- "dynamodb:ListTables"
- 'dynamodb:DescribeTable'
- 'dynamodb:BatchGetItem'
Resource:
- "*"
logs:
frameworkLambda: true
layers:
gemlayer:
path: ruby
functions:
icalendar:
handler: app/webhook_handler.WebhookHandler.call
layers:
- {Ref: GemlayerLambdaLayer }
environment:
APP_NAME: icalendar
APP_ENV: ${self:custom.myStage}
GEM_PATH: /opt/2.7.0
SENTRY_DSN: ${ssm:/app/${self:service}/${self:custom.myStage}/sentry_dsn}
TELEGRAM_BOT_API_TOKEN: ${ssm:/app/${self:service}/${self:custom.myStage}/telegram_token}
events:
- http:
path: icalendar
method: post
cors: true
package:
include:
- webhook_handler.rb
- app/**
- config/**
- lib/**
- system/**
exclude:
- ruby/**
custom:
myStage: ${opt:stage, self:provider.stage}