Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (33 sloc) 970 Bytes
service: stock-alarms
provider:
name: aws
region: eu-west-1
runtime: nodejs8.10
timeout: 5
versionFunctions: false
environment:
SENDER_EMAIL: ${file(serverless.env.yml):SENDER_EMAIL, env:SENDER_EMAIL}
RECIPIENT_EMAIL: ${file(serverless.env.yml):RECIPIENT_EMAIL, env:RECIPIENT_EMAIL}
MAILGUN_KEY: ${file(serverless.env.yml):MAILGUN_KEY, env:MAILGUN_KEY}
MAILGUN_DOMAIN: ${file(serverless.env.yml):MAILGUN_DOMAIN, env:MAILGUN_DOMAIN}
custom:
alerts:
topics:
alarm:
topic: ${self:service}-alerts-alarm
notifications:
- protocol: email
endpoint: ${file(serverless.env.yml):RECIPIENT_EMAIL, env:RECIPIENT_EMAIL}
definitions:
functionErrors:
period: 86400 # 1 day
treatMissingData: notBreaching
alarms:
- functionErrors
functions:
stock-alarms:
handler: src/index.run
events:
- schedule: rate(1 day)
plugins:
- serverless-plugin-aws-alerts
You can’t perform that action at this time.