Home > OS >  How to add multiple email address to a SNS topic via cloudformation?
How to add multiple email address to a SNS topic via cloudformation?

Time:09-25

is it possible to add more than one email address to a SNS topic subscription via cloudformation

SNSTopic:
   Type: AWS::SNS::Topic
   Properties:
    Subscription:
    - protocol:email
      Endpoint: [email protected]

CodePudding user response:

There are no loops in CFN. So you have to explicitly list all your email addresses:

SNSTopic:
   Type: AWS::SNS::Topic
   Properties:
    Subscription:
    - protocol:email
      Endpoint: [email protected]
    - protocol:email
      Endpoint: [email protected]
    - protocol:email
      Endpoint: [email protected]

If you want to do it dynamically, you have to create your own macro or custom resource.

  • Related