-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
51 lines (46 loc) · 1.97 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
service: apm-processexport
provider:
name: aws
runtime: nodejs18.x
region: us-east-1
stage: dev #cli build params will override this!!
stackName: APMExportTrigger${self:custom.myStage}
frameworkVersion: ^3.25.1
custom:
myStage: ${opt:stage, self:provider.stage} #use the --stage CLI option if it exists, or use provider.stage
plugins:
-serverless-plugin-typescript
package:
patterns:
- '!node_modules/**/*'
- 'node_modules/adm-zip/**'
- 'node_modules/mp3-duration/**'
- 'node_modules/index/**'
- 'node_modules/bluebird/**'
- 'node_modules/bluebird-co/**'
- 'node_modules/content-type/**'
- 'node_modules/debug/**'
- 'node_modules/file-type/**'
- 'node_modules/media-typer/**'
- 'node_modules/ms/**'
- 'node_modules/music-metadata/**'
- 'node_modules/strtok3/**'
- 'node_modules/then-read-stream/**'
- 'node_modules/token-types/**'
functions:
apm-processexport:
handler: src/index.handler # required, handler set in AWS Lambda
name: apm-processexport-${self:custom.myStage} # optional, Deployed Lambda name
description: Process SQS export message to add media to audio or export file # optional, Description to publish to AWS
#events:
# - s3:
# bucket: ${file(./serverless.env.yml):${self:custom.myStage}.SIL_TR_USERFILES_BUCKET
# event: s3:ObjectCreated:*
# existing: true
runtime: nodejs16.x # optional overwrite, default is provider runtime
memorySize: ${file(./serverless.env.yml):${self:custom.myStage}.MEMORY} # optional, in MB, default is 1024
timeout: ${file(./serverless.env.yml):${self:custom.myStage}.TIMEOUT} # optional, in seconds, default is 6
role: ${file(./serverless.env.yml):${self:custom.myStage}.SIL_TR_LAMBDA_ROLE}
environment:
SIL_TR_USERFILES_BUCKET: ${file(./serverless.env.yml):${self:custom.myStage}.SIL_TR_USERFILES_BUCKET}
SIL_TR_EXPORT_QUEUE: ${file(./serverless.env.yml):${self:custom.myStage}.SIL_TR_EXPORT_QUEUE}