January 2019
Intermediate to advanced
490 pages
15h 37m
English
Let's go through the following steps to create metric filters using AWS CLI:
[ { "metricName": "HelloCountMetric", "metricNamespace": "ServerlessProgrammingCookbook", "metricValue": "1" }]
Save this into the metric-transformations.json file.
aws logs put-metric-filter \ --log-group-name /aws/lambda/demo-lambda-with-cli \ --filter-name 'HelloCountFilter' \ --filter-pattern 'Hello' \ --metric-transformations file://metric-transformations.json \ --region us-east-1 \ --profile admin
Read now
Unlock full access