I’m trying to set up email alerts for my Lambda errors (…invocations, etc). I can update my .yml
file to create a new topic
and this works OK:
custom:
alerts:
stages:
- production
- dev
- development
dashboards: true
topics:
alarm:
topic: ${self:service}-${sls:stage}-alerts-alarm
notifications:
- protocol: email
endpoint: myemail@domain.com
alarms:
- functionErrors
- functionThrottles
- functionInvocations
- functionDuration
I receive emails as expected.
But when I try to use an existing SNS Topic, by following the SLS docs, nothing seems to happen. I’ve:
- Created a Topic in the SNS console
- Updated the
.yml
as per the docs:
custom:
alerts:
stages:
- production
- dev
- development
topics:
alarm:
topic: arn:aws:sns:${aws:region}:${aws:accountId}:myp-${sls:stage}-alerts
alarms:
- functionErrors
- functionThrottles
- functionInvocations
- functionDuration
The deploy works fine, but I don’t get any emails when I trigger errors. What do I need to do?