-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
106 lines (97 loc) · 2.39 KB
/
Copy pathserverless.yml
File metadata and controls
106 lines (97 loc) · 2.39 KB
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
service: crm
package:
exclude:
- "**/node_modules/aws-sdk/**"
plugins:
- serverless-offline
- serverless-dotenv-plugin
- serverless-prune-plugin
- serverless-plugin-aws-alerts
custom:
DB_PASSWORD:
local: password
development: ${env:DB_PASSWORD}
staging: ${ssm:DB_PASSWORD}
production: ${ssm:DB_PASSWORD}
defaultRegion: us-east-1
defaultEnvironmentGroup: dev-staging
region: ${opt:region, self:custom.defaultRegion}
stage: ${opt:stage, env:USER}
objectPrefix: "${self:service}-${self:custom.stage}"
prune:
automatic: true
number: 10
alerts:
dashboards: true
topics:
ok: arn:aws:sns:us-east-1:177120553227:cloudwatchAlert
alarm: arn:aws:sns:us-east-1:177120553227:cloudwatchAlert
insufficientData: arn:aws:sns:us-east-1:177120553227:cloudwatchAlert
definitions: # these defaults are merged with your definitions
functionErrors:
period: 60 # override period
# You can pin your service to only deploy with a specific Serverless version
# Check out our docs for more details
# frameworkVersion: "=X.X.X"
provider:
name: aws
runtime: nodejs12.x
apiGateway:
- ${self:custom.alias.${opt:stage, self:provider.stage}}
# you can overwrite defaults here
# stage: dev
# region: us-east-1
iamRoleStatements:
- Effect: "Allow"
Action:
- "dynamodb:*"
Resource: "*"
- Effect: "Allow"
Action:
- "ssm:*"
Resource: "*"
- Effect: "Allow"
Action:
- "states:*"
Resource: "*"
- Effect: "Allow"
Action:
- "lambda:*"
Resource: "*"
- Effect: "Allow"
Action:
- "ses:*"
Resource: "*"
- Effect: "Allow"
Action:
- "sqs:*"
Resource: "*"
- Effect: "Allow"
Action:
- "s3:*"
Resource: "*"
- Effect: "Allow" # xray permissions (required)
Action:
- "xray:PutTraceSegments"
- "xray:PutTelemetryRecords"
Resource:
- "*"
functions:
api:
handler: src/handler.api
timeout: 30
memorySize: 824
environment:
NODE_ENV: ${self:custom.stage}
DB_PASSWORD: ${env:DB_PASSWORD}
alarms: # merged with function alarms
- functionErrors
events:
- http:
path: crm/{proxy+}
method: ANY
cors: true
- http:
path: api/crm/{proxy+}
method: ANY
cors: true