Amazon SNS
Each outbound message becomes one Publish to your topic. The message is the payload, and the signature attributes go in as SNS message attributes, so subscription filter policies can match on hookbase-event-type. Requires the Starter plan or above.
Settings
| Field | Required | Notes |
|---|---|---|
topicArn | Yes | arn:aws:sns:<region>:<account id>:<topic>. The region is taken from it. |
messageGroupId | FIFO only | Required for .fifo topics. The message id is the deduplication id. |
accessKeyId / secretAccessKey | Yes | A key with the policy below. |
IAM policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "sns:Publish",
"Resource": "arn:aws:sns:us-east-1:123456789012:orders"
}
]
}Filtering by event type
Subscribers can take just the events they want with a filter policy on the attribute:
{ "hookbase-event-type": ["order.created", "order.refunded"] }To verify in an SQS subscriber, turn on raw message delivery for the subscription. The SQS message then carries the original body and attributes, and you verify it as shown for SQS.