如何使用云托管通过SNS发送电子邮件通知

问题描述 投票:0回答:1

我正在尝试配置托管策略,该策略将进行一些基本过滤并通过邮件(SNS)将比赛的详细信息发送给特定用户。

我可以将电子邮件发送给用户,但无法编辑邮件主题或邮件正文,而是获取默认邮件主题和邮件正文中的一些随机文本。

我的托管政策:

policies:
  - name: iam-user-permission-check
    resource: aws.iam-user
    description: |
      Finding IAM users with specific tags.
    filters:
      - and:
        - type: check-permissions
          match: allowed
          actions:
            - '*:*'
        - "tag:c7n": "absent"
    actions:
      - type: notify
        subject: "IAM Users Without Proper Tags"
        template: |
          The following IAM users match the filter criteria:
          {% for user in resources %}
          - IAM User: {{ user.UserName }}
            Tags: {{ user.Tags }}
          {% endfor %}
        transport:
         type: sns
         topic: <sns-topic-arn>
         region: us-east-1

我做了一些研究,我通过在mailer.html中传递SQS队列来使用带有SES的c7n-mailer,难道不能通过使用SNS来完成吗?

我在这里缺少什么?

amazon-web-services email amazon-sns amazon-ses cloudcustodian
1个回答
0
投票

查看输入转换器或 Lambda 选项来修改电子邮件通知正文并仅接收所需的内容。

阿赞 [电子邮件受保护]

© www.soinside.com 2019 - 2024. All rights reserved.