-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
64 lines (58 loc) · 1.58 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
# console: true
# org: apillonadmin
# app: apillon-v2
service: apillon-social-service-${opt:stage, 'dev'}
frameworkVersion: '3'
custom:
webpack:
webpackConfig: ./webpack.config.js
packager: "npm"
includeModules: true
packagerOptions:
lockFile: '../../package-lock.json'
excludeFiles: '**/*\.test\.js|**/*\.test\.ts|**/tests/**/*'
plugins:
- serverless-webpack
provider:
name: aws
runtime: nodejs20.x
region: eu-west-1
stage: ${opt:stage, 'dev'}
iam:
role: arn:aws:iam::018021943180:role/serverless-workers-executor
vpc:
securityGroupIds:
- sg-091bc1ce7424a7921
subnetIds:
- subnet-0bea6dd0c2a5ecc61
- subnet-085447b898128fc92
- subnet-0ed148d48e931f5fa
environment:
${file(../../bin/deploy/env/env.yml)}
package:
individually: true
patterns:
- '!dist/**'
excludeDevDependencies: true
functions:
social-service:
handler: ./src/handler.handler
name: 'apillon-social-service-${self:provider.stage}'
description: Apillon social Service
memorySize: 512
timeout: 30
social-service-worker:
handler: ./src/workers/worker-executor.handler
name: apillon-social-service-worker-${self:provider.stage}
description: Serverless workers for Apillon social microservice
memorySize: 512
timeout: 900
reservedConcurrency: 30
environment:
AWS_WORKER_LAMBDA_NAME: ${self:functions.social-service-worker.name}
events:
- sqs:
arn: ${env:WORKER_SQS_ARN}
batchSize: 4
maximumBatchingWindow: 5
functionResponseType: ReportBatchItemFailures