ACloudGuru / serverless-plugin-aws-alerts

A Serverless Framework plugin that creates CloudWatch alarms for functions.
MIT License
531 stars 149 forks source link

SNS Topic Ref to AWS Clouformation #154

Closed jbrads11 closed 3 years ago

jbrads11 commented 3 years ago

We are trying to Ref to CloudFormation topic and we are getting TypeError: topic.indexOf is not a function.

Our code looks like this:

Set SNS Topics
topics:
  alarm:
    topic:
      Ref: AlarmTopic
resources:
  Resources:
    AlarmTopic:
      Type: AWS::SNS::Topic
      Properties:
        DisplayName: ${self:service}-${opt:stage}-alerts-alarm
        TopicName: ${self:service}-${opt:stage}-alerts-alarm
        KmsMasterKeyId: tester/key
        Subscription:
          - Endpoint: test23@gmail.com
            Protocol: EMAIL