serverless-plugin-aws-alerts icon indicating copy to clipboard operation
serverless-plugin-aws-alerts copied to clipboard

Unable to get Multiple topic definitions working

Open mayanagarwal opened this issue 2 years ago • 0 comments

This is a Bug Report

Description

Unable to get Multiple topic definitions working when following the docs.

serverless.yml contents-

alerts:
  stages:
  - prod
  - dev
  topics:
    nonCritical:
      alarm:
        topic: ${sls:stage}-alerts-alarm
        notifications:
        - protocol: email
          endpoint: <EMAIL>
    critical:
      ok:
        topic: ${sls:stage}-critical-alerts-ok
        notifications:
        - protocol: https
          endpoint: <ENDPOINT>
      alarm:
        topic: ${sls:stage}-critical-alerts-alarm
        notifications:
        - protocol: https
          endpoint: <ENDPOINT>
  definitions:
    twentyRepeatedFunctionErrors:
      namespace: "AWS/Lambda"
      metric: Errors
      threshold: 20
      statistic: Sum
      period: 300
      evaluationPeriods: 1
      datapointsToAlarm: 1
      comparisonOperator: GreaterThanOrEqualToThreshold
      treatMissingData: missing
      okActions:
        - critical
      alarmActions:
        - critical
    threeRepeatedFunctionErrors:
      namespace: "AWS/Lambda"
      metric: Errors
      threshold: 3
      statistic: Sum
      period: 300
      evaluationPeriods: 1
      datapointsToAlarm: 1
      comparisonOperator: GreaterThanOrEqualToThreshold
      treatMissingData: missing
      alarmActions:
        - nonCritical
    increasedFunctionErrors:
      namespace: "AWS/Lambda"
      metric: Errors
      threshold: 0.5
      statistic: Average
      period: 1200
      evaluationPeriods: 1
      datapointsToAlarm: 1
      comparisonOperator: GreaterThanOrEqualToThreshold
      treatMissingData: breaching
      alarmActions:
        - nonCritical

Additional Data

  • Stack Trace: ✖ Stack backend-dev failed to deploy (8s) Environment: darwin, node 14.21.2, framework 3.26.0 (local), plugin 6.2.2, SDK 4.3.2 Credentials: Local, environment variables Docs: docs.serverless.com Support: forum.serverless.com Bugs: github.com/serverless/serverless/issues Error: The CloudFormation template is invalid: Template format error: Unresolved resource dependencies [AwsAlertsAlarm] in the Resources block of the template

mayanagarwal avatar Apr 12 '23 01:04 mayanagarwal