-
Notifications
You must be signed in to change notification settings - Fork 3
/
serverless.yml
54 lines (47 loc) · 1015 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
48
49
50
51
52
53
54
service: headless-api
provider:
name: aws
runtime: python3.7
region: ap-southeast-1
logs:
httpApi: true
environment:
S3_BUCKET_NAME: headless-api-uploads
CHROME_BINARY_PATH: /var/task/src/bin/headless-chromium
CHROME_DRIVER_PATH: /var/task/src/bin/chromedriver
iamRoleStatements:
- Effect: Allow
Action:
- s3:GetObject
- s3:PutObject
Resource: 'arn:aws:s3:::headless-api-uploads/*'
functions:
app:
handler: src.asgi.handler
timeout: 20
memorySize: 1536
events:
- httpApi: "*"
package:
exclude:
- node_modules/**
- venv/**
- .direnv/**
- .mypy_cache/**
- .pytest_cache/**
custom:
pythonRequirements:
dockerizePip: true
strip: false
slim: true
slimPatterns:
- '**/*.py[c|o]'
- '**/__pycache__*'
resources:
Resources:
HeadlessAPIUploads:
Type: AWS::S3::Bucket
Properties:
BucketName: headless-api-uploads
plugins:
- serverless-python-requirements