-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
53 lines (48 loc) · 1.47 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
service: on-demand-collection-services
provider:
name: aws
stage: dev
runtime: ${self:custom.config.runtime}
region: ${self:custom.config.region}
memorySize: ${self:custom.config.memorySize}
environment:
LAMBDA: "LAMBDA"
deploymentBucket:
name: ${self:custom.config.deploymentBucket} # Deployment bucket name. Default is generated by the framework
maxPreviousDeploymentArtifacts: 10 # On every deployment the framework prunes the bucket to remove artifacts older than this limit. The default is 5
package:
include:
- ./core/**
- ./config/**
- ./main.py
- ./social_networks/**
- '!**/.pytest_cache/**'
- '!**/__pycache__/**'
exclude:
- ./**
plugins:
- serverless-pseudo-parameters
- serverless-python-requirements
custom:
pythonRequirements:
usePipenv: false
useDownloadCache: false
fileName: requirements.txt
useStaticCache: true
dockerizePip: non-linux
zip: true
noDeploy:
- pytest
config: ${file(./config/lambda_deploy_config/config.json)} # You can reference the entire file
functions:
- main_func:
role: ${self:custom.config.role}
handler: main.lambda_handler
description: "On-Demand collection services - Data system"
memorySize: ${self:custom.config.memorySize}
timeout: 120
events:
# Provide the ARN of your queue. It will trigger this lambda
- sqs:
arn: ${self:custom.config.arn_sqs_user_collection}
batchSize: 1