IIUC
- Serverless Framework: Plugins
- GitHub - ACloudGuru/serverless-plugin-aws-alerts: A Serverless Framework plugin that creates CloudWatch alarms for functions.
only tests lambda metrics, which is kindof pointless for HTTP aka AWS/ApiGateway.
I was looking for a help to help setup alarms, and it seems easiest just to do it via resources, e.g.
resources:
Resources:
NotifyMe:
Type: AWS::SNS::Topic
Properties:
TopicName: ${self:service}-NotifyMe
Api5xxAlarm:
Type: AWS::CloudWatch::Alarm
Properties:
Namespace: AWS/ApiGateway
MetricName: 5XXError
Dimensions:
- Name: ApiName
Value: ${self:provider.stage}-${self:service}
Statistic: Sum
ComparisonOperator: GreaterThanThreshold
Threshold: 0
Period: 60
EvaluationPeriods: 1
AlarmActions:
- Ref: NotifyMe
Am I missing something?