-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
93 lines (88 loc) · 2.46 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
service: starter-serverless-python-v1
package:
exclude:
- .git/**
- .serveless/**
- node_modules/**
- config/**
- __pycache__/**
- temp/**
- spec/**
- prove/**
- scripts/**
- htmlcov/**
- .*
- '*.py'
- package.json
- package-lock.json
- requirements.txt
- dev_requirements.txt
- tox.ini
- README.md
include:
- config/config.json
- config/schema.json
provider:
name: aws
runtime: python3.6
stage: ${env:SERVERLESS_STAGE}
region: ${env:SERVERLESS_REGION}
versionFunctions: false
plugins:
- serverless-python-requirements
- serverless-pseudo-parameters
- serverless-plugin-custom-domain
custom:
domain:
name: ${env:SERVERLESS_CUSTOM_DOMAIN_NAME_BASE_DOMAIN_NAME}
basePath: v1
authorizer:
arn: arn:aws:lambda:${self:provider.region}:#{AWS::AccountId}:function:nsp-identity-services-v1-${self:provider.stage}-custom-authorizer
resultTtlInSeconds: 300
identitySource: method.request.header.Authorization
functions:
create-thing:
handler: src/thing/lambdas/create_thing.handler
timeout: 30
events:
- http:
path: thing
method: post
cors: true
authorizer: ${self:custom.authorizer}
get-thing:
handler: src/thing/lambdas/get_thing.handler
timeout: 30
events:
- http:
path: thing/{uuid}
method: get
cors: true
authorizer: ${self:custom.authorizer}
update-thing:
handler: src/thing/lambdas/update_thing.handler
timeout: 30
events:
- http:
path: thing/{uuid}
method: put
cors: true
authorizer: ${self:custom.authorizer}
delete-thing:
handler: src/thing/lambdas/delete_thing.handler
timeout: 30
events:
- http:
path: thing/{uuid}
method: delete
cors: true
authorizer: ${self:custom.authorizer}
list-things:
handler: src/thing/lambdas/list_things.handler
timeout: 30
events:
- http:
path: thing
method: get
cors: true
authorizer: ${self:custom.authorizer}