This repository was archived by the owner on May 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathserverless.example.yml
112 lines (107 loc) · 2.98 KB
/
serverless.example.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
service: ${env:APP_NAME}
variablesResolutionMode: 20210326
frameworkVersion: '2'
configValidationMode: error
plugins:
- serverless-python-requirements
# https://www.serverless.com/plugins/serverless-offline/
- serverless-offline
# https://www.serverless.com/plugins/serverless-plugin-canary-deployments/
- serverless-plugin-canary-deployments
# https://www.serverless.com/plugins/serverless-plugin-resource-tagging/
- serverless-plugin-resource-tagging
# https://www.serverless.com/plugins/serverless-tag-cloud-watch-logs/
- serverless-tag-cloud-watch-logs
# https://www.serverless.com/plugins/serverless-wsgi
- serverless-wsgi
provider:
name: aws
region: ${env:AWS_REGION}
logRetentionInDays: ${env:LOG_RETENTION_IN_DAYS}
lambdaHashingVersion: 20201221
environment: ${ssm:/aws/reference/secretsmanager/${env:SECRETS_NAME}}
apiGateway:
shouldStartNameWithService: true
deploymentBucket: ${env:LAMBDA_DEPLOYMENT_BUCKET}
deploymentPrefix: ${self:service}
stage: ${env:ENVIRONMENT_NAME}
stackTags:
App: "${env:APP_NAME}"
Env: "${env:ENVIRONMENT_NAME}"
Iac: "serverless-ci-IAC-VERSION"
Repository: "${env:REPOSITORY_NAME}"
custom:
wsgi:
app: app.app
packRequirements: false
pythonRequirements:
dockerizePip: non-linux
cloudWatchLogsTags:
App: ${env:APP_NAME}
Env: ${env:ENVIRONMENT_NAME}
Iac: serverless-ci-IAC-VERSION
Repository: ${env:REPOSITORY_NAME}
functions:
app:
handler: ${env:LAMBDA_HANDLER}
name: ${env:APP_NAME}-${env:ENVIRONMENT_NAME}
runtime: ${env:LAMBDA_RUNTIME}
memorySize: ${env:LAMBDA_MEMORY_SIZE}
timeout: ${env:LAMBDA_TIMEOUT}
reservedConcurrency: 5
role: ${env:LAMBDA_EXECUTION_ROLE_ARN}
events:
# index
- http:
method: GET
path: /${env:APP_NAME}
cors: true
# event_v1
- http:
method: POST
path: /${env:APP_NAME}/v1/event
cors: true
# event_v1
- http:
method: GET
path: /${env:APP_NAME}/v1/event
cors: true
# alive
- http:
method: GET
path: /${env:APP_NAME}/alive
cors: true
# favicon
- http:
method: GET
path: /${env:APP_NAME}/favicon-32x32.png
cors: true
# favicon
- http:
method: GET
path: /${env:APP_NAME}/favicon-16x16.png
cors: true
# docs
- http:
method: GET
path: /${env:APP_NAME}/docs
cors: true
# openapi
- http:
method: GET
path: /${env:APP_NAME}/openapi.yml
cors: true
deploymentSettings:
type: ${env:LAMBDA_DEPLOYMENT_PREFERENCE_TYPE}
alias: Live
vpc:
securityGroupIds:
- ${env:LAMBDA_SECURITY_GROUP_ID}
subnetIds:
- ${env:SUBNET_ID_0}
- ${env:SUBNET_ID_1}
environment:
APP_ENV: ${env:ENVIRONMENT_NAME}
DEBUG: true
LOG_LEVEL: error
REGION_NAME: ${env:AWS_REGION}