AWSAmazon SNSMessaging

aws_sns_topic cost estimation

A pub/sub topic for sending notifications. Priced per message published, per delivery, and by destination protocol.

An aws_sns_topic is a managed pub/sub topic for fanning out messages to subscribers. SNS has no per-topic fee; you pay per published message and per delivery.

Pricing components:

Publish requests: $0.50 per million for the first 1 billion/month. The first 1 million publishes per month are free at the account level.

Deliveries: vary by destination protocol. SNS-to-SQS, SNS-to-Lambda, and SNS-to-HTTP/HTTPS are bundled with the publish fee. SNS-to-Email is $2.00 per 100,000 deliveries with a free tier. SNS-to-SMS is the expensive one: $0.0075 per SMS in US, more for international.

FIFO topics (fifo_topic = true): $0.50 per million publishes, $0.017 per 64 KB payload (so $0.017 per message up to 64 KB).

Data transfer out: bytes delivered to subscribers outside AWS incur standard egress charges.

SNS Mobile Push (to iOS/Android via APNs/FCM): same pricing as standard publishes plus a tiny per-notification fee.

Fan-out pattern (SNS → multiple SQS queues): each message published once to SNS is counted as one publish; each delivery to a subscribed SQS queue is one delivery, with the SQS-side receive being a separate SQS request.

c3x estimates declared topics at $0 (the topic itself is free). Message volume is usage-based via c3x-usage.yml.

Terraform example

A minimal but realistic configuration that C3X can estimate.

resource "aws_sns_topic" "alerts" {
  name = "production-alerts"

  delivery_policy = jsonencode({
    http = {
      defaultHealthyRetryPolicy = {
        minDelayTarget     = 20
        maxDelayTarget     = 20
        numRetries         = 3
        backoffFunction    = "linear"
      }
    }
  })
}

resource "aws_sns_topic_subscription" "ops_email" {
  topic_arn = aws_sns_topic.alerts.arn
  protocol  = "email"
  endpoint  = "ops@example.com"
}

Pricing dimensions

What you actually pay for when you provision aws_sns_topic.

DimensionUnitWhat's being charged
Publish requests (standard)per 1M publishesEach published message. First 1M/month free.
$0.50/1M publishes
Publish requests (FIFO)per 1M publishes + per payloadFIFO topics charge per publish plus per 64 KB payload chunk.
$0.50/1M + $0.017 per 64 KB
Deliveries to emailper 100,000 deliveriesFree tier of 1,000 email deliveries per month.
$2.00/100,000 email deliveries
Deliveries to SMSper SMSMost expensive delivery type. Rate varies by destination country.
$0.0075/SMS in the US
Deliveries to SQS/Lambda/HTTP/HTTPSper deliveryBundled with publish pricing. Negligible incremental cost.

Optimization tips

Common ways to reduce aws_sns_topic cost without changing the workload.

Avoid SMS for high-volume notifications

Major for SMS-heavy workloads

SMS is the most expensive delivery type, often 100x more per message than email or HTTP. Move alerts to email, Slack webhooks, or PagerDuty integration.

Use SQS over SNS for queue-style messaging

$0.50/1M removed publishes

SNS is for fan-out (one message to many subscribers). If you need a queue (one consumer at a time), use SQS directly. Skipping SNS saves the publish fee.

Batch publish where possible

Up to 90% on publishes

PublishBatch (up to 10 messages per call) counts as one request but delivers all 10. Reduces request count by 10x for batchable workloads.

Use email digests instead of per-event emails

Volume-dependent

If you're paying for email deliveries, consolidating notifications into hourly or daily digests can cut delivery count by 100x.

FAQ

Does c3x estimate SNS cost from Terraform alone?

Only the topic structure. Message volumes and delivery protocols are usage-based. Specify monthly_publishes and subscriber breakdown in c3x-usage.yml.

What's the cost difference between Standard and FIFO topics?

Same per-publish rate ($0.50/1M) but FIFO adds a per-payload fee ($0.017/64KB). For small messages it's negligible; for 64KB-max messages it adds up. Use FIFO only when ordering or deduplication is required.

Does SNS-to-Lambda billing include the Lambda invocation?

The SNS-to-Lambda delivery itself is free (bundled with publish). The Lambda invocation and duration are billed separately on aws_lambda_function.

What about cross-region delivery?

SNS topics are regional. Cross-region delivery requires explicit setup. Data transfer charges apply to bytes flowing between regions, on top of the SNS publish/delivery fees.

Related resources

Estimate this resource in your own Terraform

Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including aws_sns_topic.