-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
69 lines (62 loc) · 1.41 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
service: crest-api
plugins:
- serverless-python-requirements
- serverless-offline
custom:
pythonRequirements:
dockerizePip: true
zip: true
provider:
name: aws
runtime: python3.8
lambdaHashingVersion: '20201221'
stage: ${opt:stage, 'dev'}
memorySize: 2048
timeout: 30
iamRoleStatements:
- Effect: "Allow"
Action:
- "s3:ListBucket"
Resource: { "Fn::Join" : ["", ["arn:aws:s3:::", { "Ref" : "ServerlessDeploymentBucket" } ] ] }
- Effect: 'Allow'
Action:
- 's3:*'
Resource: "arn:aws:s3:::nfwf-tool/*"
- Effect: 'Allow'
Action:
- 's3:*'
Resource: "arn:aws:s3:::nfwf-tool-user-shapes/*"
environment:
STAGE: ${self:provider.stage}
functions:
identify:
handler: identify.lambda_handler
events:
- http:
path: identify
method: get
cors: true
request:
parameters:
querystrings:
region: true
lng: true
lat: true
zonal_stats:
handler: zonal_stats.handler
events:
- http:
path: zonal_stats
method: post
cors: true
request:
parameters:
querystrings:
region: true
upload_shape:
handler: upload_shape.handler
events:
- http:
path: upload_shape
method: post
cors: true