Skip to content

SNS

The sns.publish action allows you to send messages to an SNS topic, phone number, or mobile endpoint.

Set kind = "sns.publish" in your TOML file.

FieldTypeDescription
topic_arnstringARN of the topic to publish to.
target_arnstringARN of specific target (e.g. mobile endpoint).
phone_numberstringE.164 phone number for SMS.
subjectstringSubject line (for Email/Email-JSON).
message_structurestringSet to json if sending different messages for different protocols.
message_group_idstringRequired for FIFO topics.
message_deduplication_idstringRequired for FIFO topics.
message_attributesmapcontent metadata.

Note: You must provide exactly one of topic_arn, target_arn, or phone_number.

version = "1.0"
kind = "sns.publish"
[sns]
topic_arn = "arn:aws:sns:us-east-1:123456789012:my-topic"
subject = "System Alert"
[sns.message_attributes.Priority]
DataType = "String"
StringValue = "High"
[payload]
data = "Server load is high!"