Expand description
§AWS SNS SMS Provider
Amazon SNS SMS provider implementation for smskit.
§Sending messages
ⓘ
use sms_core::{SendRequest, SmsClient};
use sms_aws_sns::AwsSnsClient;
let client = AwsSnsClient::new("us-east-1", "access_key", "secret_key");
let response = client.send(SendRequest {
to: "+14155551234",
from: "+10005551234",
text: "Hello from AWS SNS!",
}).await?;§Creating from environment variables
ⓘ
let client = AwsSnsClient::from_env()?;Reads AWS_REGION (or AWS_DEFAULT_REGION), AWS_ACCESS_KEY_ID, and
AWS_SECRET_ACCESS_KEY from the environment. These are the same variable
names that the AWS CLI and SDKs use.
§Features
- Send SMS messages via AWS SNS
Publish - Delivery status webhook parsing
- Subscription confirmation handling
- Standard AWS credential management
Structs§
- AwsSns
Client - AWS SNS SMS client.
- SmsDelivery
Data - Delivery-specific data within an SNS delivery report.
- SmsDelivery
Report - The inner delivery-report payload nested inside
SnsDeliveryNotification::message. - SmsNotification
Data - Metadata within an SNS delivery report.
- SnsDelivery
Notification - An SNS notification envelope (used for both delivery reports and subscription confirmations).