-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathserverless.yml
More file actions
38 lines (34 loc) · 1007 Bytes
/
serverless.yml
File metadata and controls
38 lines (34 loc) · 1007 Bytes
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
service: cloudwatch-public-metrics
provider:
name: aws
runtime: nodejs8.10
environment:
METRIC_NAME: ${opt:metricName, file(./config.yml):METRIC_NAME}
METRIC_TITLE: ${opt:metricTitle, file(./config.yml):METRIC_TITLE}
METRIC_DURATION: ${opt:metricDuration, file(./config.yml):METRIC_DURATION}
METRIC_STATISTIC: ${opt:metricStatistic, file(./config.yml):METRIC_STATISTIC}
METRIC_SUFFIX: ${opt:metricSuffix, file(./config.yml):METRIC_SUFFIX}
METRIC_DIMENSIONS: ${opt:metricDimensions, file(./config.yml):METRIC_DIMENSIONS}
iamRoleStatements:
- Effect: "Allow"
Action:
- "cloudwatch:GetMetricStatistics"
Resource: "*"
usagePlan: ${file('./config.yml'):USAGE_PLAN}
package:
exclude:
- assets/
- src/
excludeDevDependencies: true
plugins:
- serverless-offline
functions:
main:
handler: lambda.handler
events:
- http:
path: /
method: ANY
- http:
path: /{any+}
method: ANY