aws_sns_topic_subscription cost estimation
Subscribes an endpoint to an SNS topic. Creating the subscription is free, but SNS bills per message delivered, and the rate varies enormously by protocol: HTTP and email are cheap, SMS can be expensive.
The aws_sns_topic_subscription resource connects an endpoint (a Lambda function, SQS queue, HTTP or HTTPS endpoint, email address, mobile push, or phone number) to an Amazon SNS topic so it receives published messages. Creating a subscription is free; there is no per-subscription monthly fee.
SNS cost is per delivery, and the price depends heavily on the protocol you subscribe. Publishing itself is billed at about 0.50 dollars per million requests for standard topics. Delivery to AWS-native and web endpoints is cheap or free: delivery to SQS and Lambda is free, and HTTP or HTTPS deliveries are about 0.60 dollars per million (the first 100,000 free). Email and email-JSON deliveries are about 2.00 dollars per 100,000. The expensive protocol is SMS: text-message delivery is priced per message and varies by destination country, commonly around 0.00645 dollars per message in the US and much higher internationally, so a topic that fans out to SMS at scale is the one to watch.
Because a topic can have many subscriptions, one publish fans out to all of them and each delivery bills separately. A single published message to a topic with an SQS subscriber, an HTTP subscriber, and three SMS subscribers generates one publish charge plus five deliveries at their respective rates. Fan-out amplifies cost, so the number and type of subscriptions is what drives the bill, not the free subscription resource.
There are a couple of cost-adjacent gotchas. Failed HTTP deliveries retry according to the delivery policy, and each retry is a billable delivery attempt, so a flaky endpoint can multiply delivery charges. Dead-letter queues (an SQS queue attached via redrive policy) add SQS request charges. And for high-throughput application-to-application messaging, SNS FIFO topics are priced differently (about 0.30 dollars per million published plus payload-based charges).
c3x reports aws_sns_topic_subscription as free and attributes delivery spend to the aws_sns_topic and the destination service, with SMS being the dimension most likely to surprise.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_sns_topic" "alerts" {
name = "prod-alerts"
}
# Free to create; SQS delivery is free per message.
resource "aws_sns_topic_subscription" "to_queue" {
topic_arn = aws_sns_topic.alerts.arn
protocol = "sqs"
endpoint = aws_sqs_queue.alerts.arn
}
# Also free to create, but SMS delivery bills per message and varies by country.
resource "aws_sns_topic_subscription" "to_sms" {
topic_arn = aws_sns_topic.alerts.arn
protocol = "sms"
endpoint = "+15555550123"
}Pricing dimensions
What you actually pay for when you provision aws_sns_topic_subscription.
| Dimension | Unit | What's being charged |
|---|---|---|
| SNS subscription | free | Creating a subscription is free. There is no per-subscription monthly charge. $0 (free) |
| SNS publish requests | per million requests | Each published message to a standard topic is billed as a request. $0.50 per million publishes |
| HTTP/HTTPS delivery | per million deliveries | Deliveries to web endpoints; SQS and Lambda deliveries are free. $0.60 per million (first 100,000 free) |
| SMS delivery | per message | Text-message delivery, priced per message and varying widely by destination country. The dimension most likely to surprise. ~$0.00645 per message (US), higher internationally |
Optimization tips
Common ways to reduce aws_sns_topic_subscription cost without changing the workload.
Prefer SQS and Lambda subscribers over SMS and email
SMS is ~$6.45 per million vs $0 for SQS/Lambda deliveryDelivery to SQS and Lambda is free, so route machine-to-machine fan-out through them. Reserve SMS for genuinely urgent human alerts, since SMS is the most expensive protocol by orders of magnitude.
Filter with subscription filter policies
Attach a filter policy so a subscriber only receives messages it cares about. Filtered-out messages are not delivered and not billed, which cuts delivery charges on high-volume topics without adding logic downstream.
Fix flaky HTTP endpoints to avoid retry billing
Each retry of a failed HTTP or HTTPS delivery is a billable delivery attempt. A consistently failing endpoint multiplies delivery cost, so monitor delivery status and repair or unsubscribe broken endpoints.
Consolidate SMS to fewer high-value alerts
Because SMS bills per message and per country, a topic that texts many recipients on every event scales cost linearly. Aggregate or throttle SMS notifications and send routine updates over cheaper channels.
FAQ
Does an SNS subscription cost anything to create?
No. Creating a subscription is free and there is no per-subscription monthly fee. SNS charges per message delivered, at a rate that depends on the subscription protocol.
Which subscription protocols are cheapest and most expensive?
SQS and Lambda deliveries are free. HTTP and HTTPS are about 0.60 dollars per million. Email is about 2.00 dollars per 100,000. SMS is by far the most expensive, priced per message and varying by country, so it is the protocol to watch.
How does fan-out affect cost?
One publish is delivered to every subscription on the topic, and each delivery bills separately at its protocol rate. A topic with many SMS subscribers multiplies cost per published message, while a topic with only SQS subscribers stays effectively free on delivery.
Can I reduce delivery cost without dropping subscribers?
Yes. Attach a subscription filter policy so each subscriber only receives relevant messages. Messages filtered out are neither delivered nor billed, which lowers delivery charges on high-volume topics.
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_subscription.