过滤条件匹配时触发消息,在yaml文件中。
此代码将消息触发到sqs队列,并显示消息可用,但在端点消息不会传递给用户emailid。
策略:- name:高风险组资源: security-group描述:|从安全组中移除允许开放端口入站的规则,并通知添加违规规则的用户。筛选器:- type:入口Cidr: value_type: cidr op: eq value:"0.0.0.0/0“模式: role: arn:aws:iam::91*:role/rolename schedule:'cron(30/10 10 **?*)‘类型:周期
actions:
- type: notify
template: default.html
priority_header: 1
subject: "Open Security Group Rule Created-[ {{ account }} - {{ region }}]"
violation_desc: |
"Security Group(s) Which Had Rules Open To The World:"
action_desc: |
"Actions taken"
"Actions Taken: The Violating Security Group Rule Needs to be Removed As It
Violates Our Company's Cloud Policy. Please Refer To The Cloud FAQ."
to:
- user@gmail.com
transport:
type: sqs
queue: https://sqs.region-id.amazonaws.com/91*******/queuename
region: eu-west-1消息正在传递到队列,但不会传递到usermail。我们可以使用SQS而不是SES/SNS来触发邮件吗?
发布于 2019-07-19 21:27:01
我在official documentation中找不到与此相关的任何内容,但我的理论是您不能将to字段与sqs传输类型混合使用。
actions是一个列表,因此您可能有两个操作:一个使用电子邮件地址和sns传输类型(如文档中的示例所示),另一个仅使用sqs传输类型。
https://stackoverflow.com/questions/57113175
复制相似问题