ACloudGuru/serverless-plugin-aws-alerts

Incorrect configuration causes strange errors

Open

#79 opened on Nov 14, 2018

View on GitHub
 (1 comment) (1 reaction) (0 assignees)JavaScript (150 forks)auto 404
buggood first issue

Repository metrics

Stars
 (523 stars)
PR merge metrics
 (PR metrics pending)

Description

This is a Bug Report

Description

I accidentally configured the plugin incorrectly and instead of failing gracefully, a cloudformation upload was attempted and failed spectacularly.

For bug reports:

  • What went wrong?

  • What did you expect should have happened? An error message saying the config was invalid should be printed

  • What was the config you used?

+    alerts: {
+        alarms: [
+          'functionThrottles',
+          'functionErrors',
+          'functionInvocations',
+          'functionDuration',
+        ],
+        dashboards: true,
+        topics: '${self:custom.service}-${self:custom.stage}-alerts-alarm',
+   }

(note that topics should have alarm nested underneath but it doesn't.

  • What stacktrace or error message from your provider did you see? Many AWS::SNS::Topic objects were attempted to be created, it looks like one per alarm if it were operating correctly. It then fails to create these topics saying they "already exist":

  Serverless Error ---------------------------------------

  An error occurred: AwsAlerts43 - r already exists in stack arn:aws:cloudformation:us-west-2:12345678910:stack/servicename-my-api-my-env/5c073420-d0c9-11e8-9030-0254f5c7f298.

Additional Data

  • Serverless Framework Version: 1.32.0
  • Stack Trace:
  • Provider Error messages:

Contributor guide