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
its gzip and base64'd
serialize - https://github.com/capitalone/cloud-custodian/blob/master/c7n/actions.py#L462
deserialize - https://github.com/capitalone/cloud-custodian/blob/master/tools/c7n_mailer/c7n_mailer/sqs_message_processor.py#L76
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.
Most helpful comment
Is there a setting where the message sent is not compressed?