lib/plugins/platform/platform.js/Platform/getSnsSubscription
class Platform:  getSnsSubscription(event, fn) {
    // todo existing topic arn
    const provider = this.data.service.provider;
    const subscription = {
      functionId: this.serverless.service.getFunction(fn).name,
      type: 'aws.sns',
      details: {
        function: this.serverless.service.getFunction(fn).name,
      },
      provider,
      permissions: {
        type: 'aws IAM',
        action: 'lambda:InvokeFunction',
        sourceAccount: 'Amazon',
      },
    };

    if (typeof event === 'string') {
      subscription.details.source = `AWS::SNS::${event}`;
      subscription.details.topic = event;
      subscription.permissions.sourceArn = `arn:aws:sns:${this.provider.getRegion()
        }:${provider.accountId}:${event}`;
    } else if (typeof event === 'object') {
      subscription.details.source = `AWS::SNS::${event.topicName}`;
      subscription.details.topic = event.topicName;
      subscription.details.displayName = event.displayName;
      subscription.permissions.sourceArn = `arn:aws:sns:${this.provider.getRegion()
      }:${provider.accountId}:${event.topicName}`;
    }
    subscription.event = event;
    return subscription;
  }