当我使用 sns 服务触发托管策略时,消息以不可读的格式传递。
default.html
从c7n-mailer
policies:
- name: policyname-groups
resource: security-group
description: |
Remove any rule from a security group that allows open ports ingress
and notify the user who added the violating rule.
filters:
- type: ingress
Cidr:
value_type: cidr
op: eq
value: "0.0.0.0/0"
mode:
role: arn:aws:iam::92*****:role/Custodian
schedule: 'cron(00/10 14 * * ? *)'
type: periodic
actions:
- type: notify
template: default.html
priority_header: 1
subject: " Created-[custodian {{ account }} - {{ region }}]"
violation_desc: |
" Which Had Rules Open To The World:"
action_desc: |
"taken"
"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:
- mailid@domain.com
transport:
type: sns
region: regionname
topic: topicname