This repository has been archived by the owner on Nov 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
68 lines (61 loc) · 1.72 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
62
63
64
65
66
67
68
---
service: dryrb_talk
provider:
name: aws
runtime: ruby2.5
stage: ${opt:stage, 'staging'}
profile: 'staging'
region: eu-central-1
role: ${self:custom.${self:provider.stage}.iam_role_arn}
memorySize: 512
apiKeys:
- ${self:custom.${self:provider.stage}.api_key_name}
deploymentBucket:
name: ${self:custom.${self:provider.stage}.deployment_bucket}
serverSideEncryption: AES256
deploymentPrefix: dryrb_talk
versionFunctions: false
# you can define service wide environment variables here
environment:
GEM_PATH: "/opt/ruby/2.5.0:/opt/vendor/bundle/ruby/2.5.0"
RACK_ENV: ${self:custom.profile}
# you can add packaging information here
package:
include:
- app/**
- config/**
- handlers.rb
exclude:
- docs/**
- config/**
- .serverless/**
- readme.md
- tmp/**
- .git
- .vscode
- ruby.zip
- vendor.zip
functions:
health:
handler: handlers.health
description: "lambda to check healthiness of gem layers"
layers:
- ${self:custom.${self:provider.stage}.vendor_layer_arn}
- ${self:custom.${self:provider.stage}.mysql_layer_arn}
events:
- http:
path: health
method: get
integration: lambda
private: true
# Custom configs
# for SSM settings go to System Manager > Parameter Store
custom:
profile: ${self:custom.${self:provider.stage}.profile}
staging:
profile: staging
iam_role_arn: 'arn:aws:iam::634880740869:role/dryrb_talk'
vendor_layer_arn: "arn:aws:lambda:eu-central-1:634880740869:layer:dryrb_talkr-layer:1"
mysql_layer_arn: "arn:aws:lambda:eu-central-1:634880740869:layer:mysql_0_5_1:1"
deployment_bucket: 'creditshelf-lambdas'
api_key_name: 'dryrb_talk-key'