-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
53 lines (47 loc) · 1.04 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: remak-scrap
frameworkVersion: '3'
useDotenv: true
provider:
name: aws
runtime: nodejs18.x
stage: ${opt:stage, 'dev'}
region: ap-northeast-2
timeout: 300
memorySize: 2048
environment:
NODE_ENV: 'production'
DB_URL: ${env:DB_URL}
SQS_URL: ${env:SQS_URL}
iamRoleStatements:
- Effect: Allow
Action:
- "s3:*"
- "ec2:CreateNetworkInterface"
- "ec2:DescribeNetworkInterfaces"
- "ec2:DeleteNetworkInterface"
- "sqs:SendMessage"
- "sqs:GetQueueUrl"
- "sqs:ListQueues"
Resource: "*"
logRetentionInDays: 14
layers:
- arn:aws:lambda:ap-northeast-2:518272060765:layer:chromium:4
functions:
remak-scraping:
handler: src/handler.handler
constructs:
remak-scraping-queue:
type: queue
worker:
handler: src/handler.handler
maxConcurrency: 50
timeout: 600
plugins:
- serverless-dotenv-plugin
- serverless-lift
- serverless-plugin-typescript
- serverless-prune-plugin
custom:
prune:
automatic: true
number: 10