-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
47 lines (43 loc) · 906 Bytes
/
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
service: serverless-example
frameworkVersion: '2'
provider:
name: aws
runtime: go1.x
lambdaHashingVersion: 20201221
region: eu-central-1
environment:
DB_NAME: ${ssm:/db-name~true}
DB_USER: ${ssm:/db-username~true}
DB_HOST: ${ssm:/db-host~true}
DB_PORT: ${ssm:/db-port~true}
DB_PASSWORD: ${ssm:/db-password~true}
package:
exclude:
- ./**
include:
- ./bin/**
functions:
createArticle:
handler: bin/create_article
events:
- httpApi:
path: /articles
method: post
createAuthor:
handler: bin/create_author
events:
- httpApi:
path: /authors
method: post
getArticles:
handler: bin/get_articles
events:
- httpApi:
path: /articles
method: get
getAuthors:
handler: bin/get_authors
events:
- httpApi:
path: /authors
method: get