Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add MessageAttributes for SNS filter policy #18

Open
tomoyamachi opened this issue May 24, 2021 · 4 comments
Open

add MessageAttributes for SNS filter policy #18

tomoyamachi opened this issue May 24, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@tomoyamachi
Copy link

I want to use the SNS filter policy to send an email when the scanner finds malware.
https://docs.amazonaws.cn/en_us/sns/latest/dg/sns-subscription-filter-policies.html

Is it possible to add some MessageAttributes when publishing to SNS, which is used by the lambda function to tag s3 buckets?

examples:

   "MessageAttributes": {
      "scanner_status": {
         "Type": "Number",
         "Value": 0
      },
      "malware_count": {
         "Type": "Number",
         "Value": 1
      },
      "bucket_name": {
         "Type": "String",
         "Value":"s3://bucket_url"
      }
   }

I checked aws-python-email-notification, but this script needs to activate AWS SES and Lambda.
https://github.com/trendmicro/cloudone-filestorage-plugins/tree/master/post-scan-actions/aws-python-email-notification

@carpusherw
Copy link
Contributor

Hi @tomoyamachi ,
Sorry to reply you this late as we didn't get the notification properly.
The message attributes is currently not supported and we will document this feature request. To workaround this for now, you could write a Lambda function to filter the events first and send to another SNS topic that has the email subscription.

@carpusherw carpusherw added the enhancement New feature or request label Dec 2, 2021
@felipecosta09
Copy link
Member

@carpusherw should we leave this issue open or maybe move to the Discussions under Ideas?

What are your thoughts on that?

@carpusherw
Copy link
Contributor

@felipecosta09 Depends on what you want to discuss. Or you simply want to group all feature requests? If it's the later, I don't have a preference. We should accept all ways of reporting the requests and as long as PM is aware, or had been aware 😂.

@carpusherw
Copy link
Contributor

Hi @tomoyamachi, AWS just announced the support for payload-based message filtering, which might just fit your need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants