step
aws_sns
Execute AWS SNS notification operations.
Overview
Supports operations:
- publish: Publish message to SNS topic
- publish_sms: Send SMS message directly
Setup:
1. Create an AWS account at https://aws.amazon.com/
2. Create an SNS topic in the AWS Console (https://console.aws.amazon.com/sns/)
3. Create an IAM user with SNS permissions (or use an existing user)
4. Generate AWS access keys (Access Key ID and Secret Access Key) for programmatic access
5. Store your credentials securely (e.g., environment variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
6. Note your SNS topic ARN from the console (format: arn:aws:sns:region:account-id:topic-name)
Required AWS Permissions: sns:Publish
- publish: Publish message to SNS topic
- publish_sms: Send SMS message directly
Setup:
1. Create an AWS account at https://aws.amazon.com/
2. Create an SNS topic in the AWS Console (https://console.aws.amazon.com/sns/)
3. Create an IAM user with SNS permissions (or use an existing user)
4. Generate AWS access keys (Access Key ID and Secret Access Key) for programmatic access
5. Store your credentials securely (e.g., environment variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
6. Note your SNS topic ARN from the console (format: arn:aws:sns:region:account-id:topic-name)
Required AWS Permissions: sns:Publish
Examples
Publish message to SNS topic
Send a notification message to an SNS topic for fan-out distribution
type: aws_sns
aws_access_key_id: ${env:AWS_ACCESS_KEY_ID}
aws_secret_access_key: ${env:AWS_SECRET_ACCESS_KEY}
region: us-east-1
operation: publish
topic_arn: arn:aws:sns:us-east-1:123456789012:my-topic
message: Alert: New order received
subject: Order Notification
output_to: sns_result
Send SMS message
Send a direct SMS message to a phone number
type: aws_sns
aws_access_key_id: ${env:AWS_ACCESS_KEY_ID}
aws_secret_access_key: ${env:AWS_SECRET_ACCESS_KEY}
region: us-east-1
operation: publish_sms
phone_number: +1234567890
message: Your verification code is 123456
output_to: sms_result
Publish JSON message with attributes
Send structured message with custom attributes for message filtering
type: aws_sns
aws_access_key_id: ${env:AWS_ACCESS_KEY_ID}
aws_secret_access_key: ${env:AWS_SECRET_ACCESS_KEY}
region: us-east-1
operation: publish
topic_arn: arn:aws:sns:us-east-1:123456789012:events-topic
message: '{"event": "user_signup", "user_id": "12345"}'
message_structure: json
message_attributes:
event_type:
DataType: String
StringValue: user_signup
priority:
DataType: String
StringValue: high
Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | No | Step type identifier
Default: "aws_sns" |
aws_access_key_id | string | Yes | AWS access key ID for authentication |
aws_secret_access_key | string | Yes | AWS secret access key for authentication |
region | string | Yes | AWS region (e.g., us-east-1) |
operation | string | Yes | Operation to perform: 'publish' (to topic) or 'publish_sms' (SMS message)
Options: publish, publish_sms |
topic_arn | string | No | SNS topic ARN (required for 'publish' operation) |
target_arn | string | No | SNS target ARN for mobile push notifications (optional) |
phone_number | string | No | Phone number for SMS (required for 'publish_sms' operation, format: +1234567890) |
message | string | Yes | Message content to publish |
subject | string | No | Message subject (used for email subscriptions) |
message_attributes | string | No | Message attributes as key-value pairs |
message_structure | string | No | Message structure ('json' for platform-specific messages) |
timeout | integer | No | Request timeout in seconds
Default: 30 |
output_to | string | No | Path in the event where results will be stored
Default: "sns" |
Base Configuration
These configuration options are available on all steps:
| Parameter | Type | Default | Description |
|---|---|---|---|
name | | null | Optional name for this step (for documentation and debugging) |
description | | null | Optional description of what this step does |
retries | integer | 0 | Number of retry attempts (0-10) |
backoff_seconds | number | 0 | Backoff (seconds) applied between retry attempts |
retry_propagate | boolean | false | If True, raise last exception after exhausting retries; otherwise swallow. |