chalice
chalice copied to clipboard
Support for SNS Subscription Filter Policies
I couldn't find a way to attach an SNS Subscription Filter Policy to a lambda function with chalice (there's no documentation on this in the SNS Events section and the decorator doesn't seem to have an attribute for this).
Is there a way to do this with chalice?
I need that too
+1, not only sns filter, but we need sqs filter policy as well something like
@app.on_sns_message(topic='my-demo-topic', filter_policy= "email" in subject)
def notify_email(event):
app.log.debug("About to send message to email subject: %s, message: %s",
event.subject, event.message)
@app.on_sns_message(topic='my-demo-topic', filter_policy= "mobile" in subject)
def notify_mobile_phone(event):
app.log.debug("About to send message to mobile with subject: %s, message: %s",
event.subject, event.message)
@app.on_sns_message(topic='my-demo-topic', filter_policy= "http" in subject)
def notify_http_endpoint(event):
app.log.debug("notify internal web service to mobile with subject: %s, message: %s",
event.subject, event.message)