forked from Snowflake-Labs/sfguide-snowflake-python-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless-template.yml
58 lines (51 loc) · 1.19 KB
/
serverless-template.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
service: <NAME_OF_YOUR_SERVICE>
frameworkVersion: '2'
custom:
wsgi:
app: app.app
packRequirements: false
pythonRequirements:
dockerizePip: non-linux
provider:
name: aws
runtime: python3.8
lambdaHashingVersion: '20201221'
region: us-west-2
functions:
api:
handler: wsgi_handler.handler
environment:
SNOWFLAKE_ACCOUNT: '<ACCOUNT>'
SNOWFLAKE_USER: 'DATA_APPS_DEMO'
SNOWFLAKE_DATABASE: 'DATA_APPS_DEMO'
SNOWFLAKE_SCHEMA: 'DEMO'
SNOWFLAKE_WAREHOUSE: 'DATA_APPS_DEMO'
SNOWFLAKE_PRIVATE_KEY: ${ssm:/<ACCOUNT>.DATA_APPS_DEMO}
timeout: 15
events:
- http:
path: /trips/monthly
method: GET
- http:
path: /trips/day_of_week
method: GET
- http:
path: /trips/temperature
method: GET
- http:
path: /sqlapi/trips/monthly
method: GET
- http:
path: /sqlapi/trips/day_of_week
method: GET
- http:
path: /sqlapi/trips/temperature
method: GET
plugins:
- serverless-wsgi
- serverless-python-requirements
package:
patterns:
- '!__pycache__/**'
- '!_node_modules/**'
- '!venv/**'