Skip to main content

Crate sms_aws_sns

Crate sms_aws_sns 

Source
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§

AwsSnsClient
AWS SNS SMS client.
SmsDeliveryData
Delivery-specific data within an SNS delivery report.
SmsDeliveryReport
The inner delivery-report payload nested inside SnsDeliveryNotification::message.
SmsNotificationData
Metadata within an SNS delivery report.
SnsDeliveryNotification
An SNS notification envelope (used for both delivery reports and subscription confirmations).