question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SNS Transport Delivering Empty Message

See original GitHub issue

I’m trying to utilize SNS transport in order to deliver messages from several accounts to SNS topic that is located in a designated account. A SQS queue is subscribed to the SNS topic.

I was hoping to use c7n-notify with c7n-mailer to deliver those messages to the SQS queue through the SNS topic but without success. The c7n-mailer is configured to pull messages from the SQS queue and send them using SES.

queue_url: https://sqs.us-east-1.amazonaws.com/{centralized_account}/CustodianMailerQueue
role: arn:aws:iam::{centralized_account}:role/CustodianMailer
from_address: email@domain.com
ses_region: us-east-1

In my policy I included the following configuration:

      - type: notify
        template: default.html
        priority_header: '2'
        subject: S3 Disable Public Block Event Detected
        violation_desc: "S3 Bucket Where Disable Public Block Event Detected:"
        action_desc: |
          "Actions Taken: The Violating S3 Allow Publick Block Rule Has Been Removed."
        to:
          - event-owner
        transport:
          type: sns
          topic: arn:aws:sns:us-east-1:{centralized_account}:CustodianMailerTopic

But when i’m looking at the custodian policy lambda log I can see the following:

[INFO]	2020-08-18T19:56:52.440Z	c635a52c-a1cb-4596-88c6-6bd7888a077b	sent message:None policy:s3-public-block-enable-all-event template:default.html count:1
--

Any idea why is the message empty? Of course that this configuration is not delivering any messages at the end, and I can’t see any messages reaching the SQS queue.

What am I doing wrong?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
avishayilcommented, Aug 18, 2020

I finally solved it - because my SQS was encrypted, messages couldn’t deliver.

0reactions
avishayilcommented, Aug 18, 2020

Seems like my SQS is not having the correct permissions to receive messages from SNS. Trying

Read more comments on GitHub >

github_iconTop Results From Across the Web

Amazon Simple Notification Service (SNS) FAQs - AWS
Flexible message delivery over multiple transport protocols; Inexpensive, pay-as-you-go model with no up-front costs; Web-based AWS Management Console ...
Read more >
AWS SNS Transport in PilotFish Message Routing Software
The AWS SNS (Amazon Simple Notification Service) Transport sends events to an AWS SNS Topic. One of dozens of built-in message transports.
Read more >
SNS — Boto3 Docs 1.26.34 documentation - AWS
RedrivePolicy – When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. Messages that can't be delivered due to client ...
Read more >
Data transport - Delivery Details SMS - Helpdesk
The Delivery Summary widget (part of Data Transport Data Source) is ... Template is empty, The matching sms template has not been set....
Read more >
Messenger: Sync & Queued Message Handling (Symfony Docs)
The in-memory transport does not actually deliver messages. Instead, it holds them in memory during the request, which can be useful for testing....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found