简体   繁体   中英

How to use email dynamic list to SNS Topic Subscription in AWS CloudFormation?

My templaste is (for one emeil):

  Parameters:
    MailAlarmsSNS:
       Type: String
       Default: mymail@company.com

  MessagesInErrorTopic:
    Type: AWS::SNS::Topic
    Properties:
      TopicName: foo
      DisplayName: This topic is used to send an email
      Subscription:
        - Endpoint: !Ref MailAlarmsSNS
          Protocol: email

I want use a dynamic list input (comma separated)?

You can only do that using custom resource or a macro that you would have to develop yourself in the form of lambda functions.

You can give multiple endpoints in a single SNS Topic like below:

多封电子邮件的 Cloudformation 模板

As stated by @Marcin, you typically need to use a custom resource or macro for that. This repository gives you complete code using the custom resource to add multiple endpoints.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM