-
Notifications
You must be signed in to change notification settings - Fork 18
/
serverless-lambda.yml
83 lines (74 loc) · 2.78 KB
/
serverless-lambda.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
77
78
79
80
81
82
83
# Welcome to Serverless!
#
# This file is the main config file for your service.
# It's very minimal at this point and uses default values.
# You can always add more config options for more control.
# We've included some commented out config examples here.
# Just uncomment any of them to get that config option.
#
# For full config options, check the docs:
# docs.serverless.com
#
# Happy Coding!
service: remote-patient-monitoring
# app and org for use with dashboard.serverless.com
#app: your-app-name
#org: your-org-name
# You can pin your service to only deploy with a specific Serverless version
# Check out our docs for more details
frameworkVersion: "2"
provider:
name: aws
runtime: nodejs12.x
# you can overwrite defaults here
stage: ${opt:stage, self:custom.defaultStage}
region: ap-northeast-1
apiGateway:
shouldStartNameWithService: true
minimumCompressionSize: 1024
# you can add statements to the Lambda function's IAM Role here
# iamRoleStatements:
# - Effect: "Allow"
# Action:
# - "s3:ListBucket"
# Resource: { "Fn::Join" : ["", ["arn:aws:s3:::", { "Ref" : "ServerlessDeploymentBucket" } ] ] }
# - Effect: "Allow"
# Action:
# - "s3:PutObject"
# Resource:
# Fn::Join:
# - ""
# - - "arn:aws:s3:::"
# - "Ref" : "ServerlessDeploymentBucket"
# - "/*"
# you can define service wide environment variables here
environment:
AWS_NODEJS_CONNECTION_REUSE_ENABLED: 1
Bucket: ${file(config/${self:provider.stage}.json):Bucket}
DebugMode: ${file(config/${self:provider.stage}.json):DebugMode}
DBPrefix: ${file(./config/${self:provider.stage}.json):DBPrefix}
SMS_ENDPOINT: ${file(config/${self:provider.stage}.json):SMS_ENDPOINT}
SMS_SECURITYKEY: ${file(config/${self:provider.stage}.json):SMS_SECURITYKEY}
SMS_ACCESSKEY: ${file(config/${self:provider.stage}.json):SMS_ACCESSKEY}
LOGINURL: ${file(config/${self:provider.stage}.json):LOGINURL}
# you can add packaging information here
package:
# include:
# - include-me.js
# - include-me-dir/**
${file(./templates/exclude-files.yml)}
functions: ${file(./templates/functions-lambda.yml)}
# you can add CloudFormation resource templates here
resources:
# Please comment out below two lines for the first deploy. After the deployment, enable it and deploy again.
# Swagger UI 関連の設計は https://betterdev.blog/serverless-swagger-ui-for-api-gateway/ を参考にした。
plugins:
- serverless-pseudo-parameters
- serverless-s3-deploy
- serverless-scriptable-plugin
- serverless-cloudformation-sub-variables
- serverless-plugin-typescript
custom:
defaultStage: dev
project: remote-patient-monitoring
baseName: ${self:custom.project}-${self:provider.stage}-${self:service}