This page provides a reference for AWS SNS actions available in the workflow automation actions catalog. Use these actions to publish messages to Amazon SNS topics.
Prerequisites
Before using AWS actions in workflow automation, ensure you have:
- An AWS account with appropriate permissions.
- AWS credentials configured (IAM user credentials, IAM role ARN, or session credentials).
- The necessary IAM permissions for the specific AWS services you plan to use.
See Set up AWS credentials for information on how to create IAM users and IAM roles, and set up static and session AWS credentials for integration with workflow automation AWS actions.
Publish a message to an SNS topic
The action identifier is aws.sns.publish.
Sends a message to an Amazon SNS topic. All subscribers to the topic will receive the message.
The following table describes the input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
| String | Optional. IAM role ARN to assume for AWS API calls. |
|
| String | Optional. AWS access key ID. Pass as a secret. |
|
| String | Optional. AWS secret access key. Pass as a secret. |
|
| String | Optional. Temporary session token for STS authentication. Pass as a secret. |
|
| String | Required. AWS region of the target SNS topic. |
|
| String | Required. The message to publish. Messages must be UTF-8 encoded strings and at most 256 KB in size. |
|
| String | Optional. Topic ARN to publish to. You must specify either |
|
| String | Optional. Target ARN to publish to. You must specify either |
|
| String | Optional. Subject for email-based subscriptions. |
|
| String | Optional. Set to |
|
| Map | Optional. Message attributes to attach to the message. |
|
| String | Optional. Token used for deduplication of messages in FIFO topics. |
|
| String | Optional. Tag that specifies the message group in a FIFO topic. |
|
The following table describes the output fields for this action.
Output | Type | Example |
|---|---|---|
| Object |
|
| Boolean |
|
| String |
|
name: sns-publish-testdescription: Publishes a notification to an SNS topicworkflowInputs: arnRole: type: Stringsteps: - name: aws_sns_publish_1 type: action action: aws.sns.publish version: '1' inputs: awsRoleArn: ${{ .workflowInputs.arnRole }} region: us-east-1 topicArn: arn:aws:sns:us-east-1:123456789012:workflow-test-topic subject: "Workflow Update" message: "The data processing workflow has completed successfully." next: end