Amazon SNS SMS Delivery Analysis

Analyze SMS delivery success rates, costs, and message types using Amazon SNS delivery status logs for monitoring and optimization

Analyzes SNS SMS delivery status logs to track success rates and costs by message type
Requires selecting BOTH success and failure log groups in CloudWatch Logs Insights for complete analysis
SMS delivery status logging must be enabled with proper IAM role configuration

fields @timestamp, delivery.destination, delivery.smsType, status, delivery.priceInUSD
| filter ispresent(delivery.destination)
| stats count() as messageCount, 
        sum(coalesce(delivery.priceInUSD, 0)) as totalCostUSD
        by delivery.smsType, status
| sort delivery.smsType, status
                                


< Back to snippets

GitHub icon View this snippet on GitHub


Running the CloudWatch snippet

Click on the button below to open up the snippet directly into your AWS account.

Manually running the CloudWatch snippet

2. Select Logs, and then choose Logs Insights.
3. In the Select log group(s) drop down, choose one or more log groups to query.
4. Copy snippet into query text area.
5. Click "Run Query"

Created by:

Anirudh Gupta

Anirudh Gupta

Technical Account Manager at AWS

Follow on LinkedIn