For the complete documentation index, see llms.txt.
Skip to main content
Version: 8.9

Amazon SNS connector

Use the Amazon SNS outbound connector to publish messages to an Amazon Simple Notification Service (SNS) topic from your BPMN process.

About this connector​

The Amazon SNS outbound connector publishes a message to a standard or FIFO SNS topic and returns the SNS message ID. For example, use it to send an order status notification to subscribers when a process step completes. To start or continue a process when a topic sends a notification, use the Amazon SNS inbound connector.

Prerequisites​

To use the Amazon SNS outbound connector, you need an SNS topic and an IAM access key and secret key pair with the sns:Publish permission for that topic.

Learn more about SNS permissions in the SNS Developer Guide.

note

Use secrets to store credentials and avoid exposing sensitive information from the process. See managing secrets.

Use this connector​

New to using an outbound connector? Learn how to add and use this type of connector, apply element templates, use connector secrets, handle results and errors, and more.

Configuration​

Authentication​

PropertyTypeRequiredDescriptionExample
AuthenticationDropdownYes

The AWS authentication strategy:

  • Credentials (SaaS/Self-Managed): Use this option if you have a valid pair of access and secret keys provided by your AWS account administrator.

  • Default Credentials Chain (Hybrid/Self-Managed only): Use this option if your system is configured for implicit authentication, such as role-based authentication, credentials supplied through environment variables, or files on the target host. This approach uses the Default Credential Provider Chain to resolve the required credentials.

Access keyStringYes, if Authentication is CredentialsThe access key of an IAM user with permission to publish to the SNS topic. The value can be plain text, but this isn't recommended due to security concerns.{{secrets.MY_AWS_ACCESS_KEY}}
Secret keyStringYes, if Authentication is CredentialsThe secret key of the IAM user with the access key above.

Topic properties​

PropertyTypeRequiredDescriptionExample
Topic ARNStringYesThe Amazon Resource Name (ARN) of the SNS topic to publish to.arn:aws:sns:us-east-1:123456789012:MyTopic
Topic typeDropdownYesThe type of the topic: Standard or FIFO. Standard topics maximize throughput; FIFO topics preserve ordering and deduplication. The default is Standard.
RegionStringYesThe region of the SNS topic.us-east-1

Operations​

Publish message​

Publish a message to an Amazon SNS topic.

Input parameters​

PropertyTypeRequiredDescriptionExample
Message group IDStringYes, for FIFO topicsThe ID that groups messages in a FIFO topic. Messages within the same group are delivered in sequence. Learn more about message grouping for FIFO topics. Shown when Topic type is FIFO.
Message deduplication IDStringNo, for FIFO topicsA token that prevents duplicate messages in a FIFO topic. Amazon SNS doesn't deliver messages with the same deduplication ID again within the five-minute deduplication interval. Whether you need it depends on the deduplication settings of your FIFO topic. Shown when Topic type is FIFO.
SubjectStringNoThe subject of the message. The length must be less than 100 characters.
MessageTextYesThe data to publish to the topic. You can enter text or a FEEL expression. If the value isn't a string, for example a FEEL context, the connector serializes it to JSON.
Message attributesStringNoA FEEL expression that returns the message attributes, which are optional structured metadata for the message. See message attributes.

Message attributes​

Amazon SNS lets you include structured metadata, such as timestamps, geospatial data, signatures, and identifiers, with messages using message attributes. The connector supports non-binary message attributes. Compose each attribute value to comply with the Amazon SNS message attribute data format.

Example of valid message attributes as a FEEL value:

= {
"timestamp": {
"StringValue": today(),
"DataType": "String"
},
"messageSubmittedBy": {
"StringValue": "user12345",
"DataType": "String"
}
}

Output​

The connector returns the SNS identifier of the published message:

  • messageId: The SNS message ID.

Example response:

{
"messageId": "2e062e6b-a527-5e68-b69b-72a8e42add60"
}

To use the message ID in your process, store the response with Result variable, or map it with Result expression. For example, the following expression stores the ID in the createdMessageID process variable:

= {
"createdMessageID": response.messageId
}

Troubleshooting​

To learn about general error handling in Camunda, see BPMN errors and failing jobs.

Further resources​