This repository has been archived by the owner on Jul 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserverless.yml
75 lines (71 loc) · 1.96 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
service: todo-rest-api-nest-sls
plugins:
- serverless-layers
- serverless-offline
custom:
dev:
environment:
NODE_ENV: dev
DB_HOST: ${ssm:/dafujii/todo-rest-api-nest-sls/dev/DB_HOST}
DB_PORT: 3306
DB_USERNAME: ${ssm:/dafujii/todo-rest-api-nest-sls/dev/DB_USERNAME}
DB_PASSWORD: ${ssm:/dafujii/todo-rest-api-nest-sls/dev/DB_PASSWORD}
DB_DATABASE: ${ssm:/dafujii/todo-rest-api-nest-sls/dev/DB_DATABASE}
# TODO: prod
provider:
name: aws
runtime: nodejs12.x
region: ap-northeast-1
memorySize: 256
timeout: 29
logRetentionInDays: 1
apiGateway:
minimumCompressionSize: 1024
environment:
AWS_NODEJS_CONNECTION_REUSE_ENABLED: 1
LANG: ja_JP.UTF-8
AUTH_SECRET: ${ssm:/dafujii/todo-rest-api-nest-sls/AUTH_SECRET}
NODE_ENV: ${self:custom.${opt:stage, 'dev'}.environment.NODE_ENV}
DB_HOST: ${self:custom.${opt:stage, 'dev'}.environment.DB_HOST}
DB_PORT: 3306
DB_USERNAME: ${self:custom.${opt:stage, 'dev'}.environment.DB_USERNAME}
DB_PASSWORD: ${self:custom.${opt:stage, 'dev'}.environment.DB_PASSWORD}
DB_DATABASE: ${self:custom.${opt:stage, 'dev'}.environment.DB_DATABASE}
versionFunctions: false
deploymentBucket:
name: dafujii-serverless-deploymentbucket
vpc:
securityGroupIds:
- sg-0452b1d11c2963a98
subnetIds:
- subnet-070c26f9888b68668
- subnet-0fd6a08fcce7cd6d2
iamRoleStatements:
- Effect: "Allow"
Action:
- "ec2:CreateNetworkInterface"
- "ec2:DescribeNetworkInterfaces"
- "ec2:DeleteNetworkInterface"
- "logs:CreateLogGroup"
- "logs:CreateLogStream"
- "logs:PutLogEvents"
Resource:
- "*"
package:
individually: true
include:
- dist/**
exclude:
- "**"
functions:
index:
handler: dist/handler.handler
events:
- http:
cors: true
path: "/"
method: any
- http:
cors: true
path: "{proxy+}"
method: any