-
Notifications
You must be signed in to change notification settings - Fork 31
/
serverless.yml
76 lines (70 loc) · 1.62 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
65
66
67
68
69
70
71
72
73
74
75
76
service: ${env:ALIS_APP_ID}frontend
frameworkVersion: ">=3.0.0"
provider:
name: aws
runtime: nodejs18.x
region: ${env:AWS_DEFAULT_REGION}
stage: prod
logs:
restApi: true
package:
excludeDevDependencies: true
exclude:
- .**
- .**/*
- app/**
- tests/**
- coverage/**
- LICENSE
- README.md
- package.json
- yarn-error.log
- yarn.lock
include:
- app/static/part.js
- server/**
- nuxt.config.js
- .nuxt/**
plugins:
- serverless-plugin-aws-alerts
- serverless-prune-plugin
custom:
# serverless-plugin-aws-alerts
alerts:
stages:
- alis
- staging
topics:
alarm: "arn:aws:sns:ap-northeast-1:879243243508:AlarmToSlack"
definitions:
functionErrors:
treatMissingData: notBreaching
# serverless-prune-plugin
prune:
automatic: true
number: 3
functions:
handler:
handler: server/handler.handler
timeout: 30
memorySize: 2048
environment:
BASE_URL: https://${ssm:${env:ALIS_APP_ID}ssmAlisAppDomain}
REGION: ${env:AWS_DEFAULT_REGION}
ALIS_APP_DOMAIN: ${ssm:${env:ALIS_APP_ID}ssmAlisAppDomain}
SENTRY_DSN: ${ssm:${env:ALIS_APP_ID}ssmSentryDSN}
events:
- http:
path: '/'
method: get
- http:
path: '{proxy+}'
method: get
alarms:
- functionErrors
vpc:
securityGroupIds:
- "Fn::ImportValue": ${env:ALIS_APP_ID}-FrontendSecurityGroupId
subnetIds:
- "Fn::ImportValue": ${env:ALIS_APP_ID}-PrivateLambdaMultiAZ1aSubNetId
- "Fn::ImportValue": ${env:ALIS_APP_ID}-PrivateLambdaMultiAZ1cSubNetId