serverless-heaven / serverless-aws-alias

Alias support for Serverless 1.x
MIT License
189 stars 68 forks source link

SNS Subscription resource causes - 'null' values are not allowed in templates error and failed deployment #175

Closed lkolchin closed 5 years ago

lkolchin commented 5 years ago

Hello,

Here is what I have in my serverless.yaml:

# Dist list subscription for prod alerts
      AlertTopicSubscription:
        Type: AWS::SNS::Subscription
        Condition: CreateResourcesProdStage
        Properties:
          Endpoint: ${self:custom.alarms_emails.prod_dist_list1}
          Protocol: email
          TopicArn: ${self:provider.AlertTopic}

The plugin produces this resource in compiled-cloudformation-template-alias.json :

  AlertTopicSubscription:
    Type: AWS::SNS::Subscription
    Condition: CreateResourcesProdStage
    Properties:
      Endpoint: {}
      Protocol: email
      TopicArn: arn:aws:sns:ap-southeast-2:22222222:market-base-infra-topics-sandbox-alerts
    DependsOn:
      - null
      - null

This is causing deployment to fail. Any help?