Docs / Contact / connectors/aws-sns
AWS SNS
Provider:aws| Service:sns| Direction: Write
Amazon Simple Notification Service connector for publishing messages to an SNS topic. This is a forward-only connector.
Required Permissions
| Operation | Required IAM Permissions |
|---|---|
| Publish | sns:Publish |
Tip: Scope permissions to the specific topic ARN to follow the principle of least privilege.
Operation
When a message reaches this connector, it publishes to the configured topic. The payload must supply:
| Payload field | Required | Description |
|---|---|---|
message |
Yes | Message body to publish |
Connector Configuration
The connector is created with type: "cloud", provider: "aws", service_type: "sns", plus:
Field (config) |
Required | Description |
|---|---|---|
auth_type |
No | api_key (default) or role for cross-account access. See below. |
region |
No | AWS region code. Derived automatically from topic_arn if a full ARN is supplied. |
access_key |
Conditional | AWS access key. Required when auth_type is api_key. |
secret_key |
Conditional | AWS secret key. Required when auth_type is api_key. |
topic_arn |
Yes | SNS topic ARN |
Role-based (cross-account) authentication
Set auth_type: "role" to assume an IAM role in your AWS account via STS. Provide role_arn (required) and optionally external_id. With role auth you do not supply access_key/secret_key.
Output
json
{
"status": "completed",
"statusCode": 200,
"data": {
"status": "published",
"statusCode": 200,
"method": "SNS_PUBLISH",
"endpoint": "arn:aws:sns:us-east-1:123456789:my-topic",
"duration": 38,
"response": { "topic_arn": "arn:aws:sns:us-east-1:123456789:my-topic" }
}
}
Example
Connector config (API key):
json
{
"type": "cloud",
"provider": "aws",
"service_type": "sns",
"access_key": "${secrets.aws_access_key}",
"secret_key": "${secrets.aws_secret_key}",
"topic_arn": "arn:aws:sns:us-east-1:123456789:alerts"
}
Connector config (cross-account role):
json
{
"type": "cloud",
"provider": "aws",
"service_type": "sns",
"auth_type": "role",
"role_arn": "arn:aws:iam::123456789012:role/contact-sns-publisher",
"topic_arn": "arn:aws:sns:us-east-1:123456789:alerts"
}
Tendrl