Cloud-custodian: How to view notify message

Created on 5 May 2017  路  4Comments  路  Source: cloud-custodian/cloud-custodian

Hi I'm fairly new to Cloud Custodian and I'm at the point of where I want to send out notifications via email and Slack of when things happen.

I created the below policy, but what I see on the SNS side is looks to be a Base64 decode and encrypted message. How do I decode this message?

policies:
- name: ec2-tag-compliance-mark
  resource: ec2
  comment: |
    Find all (non-ASG) instances that are not conformant
    to tagging policies, and tag them for stoppage in 1 days.
  filters:
    - "tag:aws:autoscaling:groupName": absent
    - "tag:maid_status": absent
    - or:
      - "tag:Requestor": absent
      - "tag:Department": absent
      - "tag:AppId": absent
      - "tag:AppName": absent
      - "tag:ProjectCode": absent
      - "tag:DataClass": absent
      - not:
        - type: value
          key: "tag:CostCenter"
          op: regex
          value: ^[0-9]{6}$
  actions:
    - type: mark-for-op
      op: stop
      days: 1
    - type: notify
      to:
        - [email protected]
      transport:
        type: sns
        topic: arn:aws:sns:us-east-1:123456789:custodian-test-tony
        region: us-east-1
kinquestion

Most helpful comment

Is there a setting where the message sent is not compressed?

All 4 comments

I was able to decode and uncompress the message. Thanks.

Is there a setting where the message sent is not compressed?

use c7n_mailer if you want uncompressed message formatted for humans.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nitrocode picture nitrocode  路  4Comments

dbfr3qs picture dbfr3qs  路  3Comments

kwcrook picture kwcrook  路  4Comments

kapilt picture kapilt  路  3Comments

JohnHillegass picture JohnHillegass  路  4Comments