-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
58 lines (53 loc) · 1.03 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
service: unicorn-api
provider:
name: aws
runtime: python3.8
timeout: 15
region: us-east-1
environment:
BUCKET:
Ref: S3BucketState
ATHENA_BUCKET:
Ref: S3AthenaResultBucket
iamRoleStatements: # standard permissions to store data in s3 for Athena
- Effect: "Allow"
Action:
- "s3:*"
Resource:
- "*"
- Effect: "Allow"
Action:
- "glue:*"
Resource:
- "*"
- Effect: "Allow"
Action:
- "athena:*"
Resource:
- "*"
package:
exclude:
- venv/**
- node_modules/**
functions:
app:
handler: app.main.handler
events:
- httpApi:
path: '*'
layers:
- Ref: PythonRequirementsLambdaLayer
#This creates an s3 bucket for our unicorn data
resources:
Resources:
S3BucketState:
Type: AWS::S3::Bucket
S3AthenaResultBucket:
Type: AWS::S3::Bucket
custom:
pythonRequirements:
dockerizePip: True
slim: True
layer: True
plugins:
- serverless-python-requirements