azurerm_stream_analytics_job cost estimation
A real-time stream-processing job billed per Streaming Unit-hour. Three streaming units run ~$241/month, and the job bills while it's running whether or not events flow.
An azurerm_stream_analytics_job runs continuous queries over streaming data (from Event Hubs, IoT Hub, etc.). Cost is driven by Streaming Units (SUs) — the unit of compute and memory allocated to the job — billed per SU-hour while the job is running.
Three streaming units bill about $241/month at the dedicated SU rate. SUs determine how much throughput and query complexity the job can handle; you provision them, and the job pays for that allocation whenever it's started, regardless of how many events actually arrive. A job left running over a quiet weekend still bills its SUs.
The two cost levers are how many SUs you allocate and whether the job runs continuously. Over-provisioning SUs for peak event rates that rarely occur is the common overspend; so is leaving non-production jobs running 24/7.
c3x prices the job from streaming_units, so the SU allocation cost is visible before deployment.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "azurerm_stream_analytics_job" "events" {
name = "events-job"
resource_group_name = azurerm_resource_group.main.name
location = azurerm_resource_group.main.location
streaming_units = 3
transformation_query = <<QUERY
SELECT * INTO [output] FROM [input]
QUERY
}Pricing dimensions
What you actually pay for when you provision azurerm_stream_analytics_job.
| Dimension | Unit | What's being charged |
|---|---|---|
| Streaming units | per SU-hour | Compute/memory allocated to the job, billed per hour while the job runs regardless of event volume. ~$0.11/SU-hour → 3 SU ≈ $240.90/month |
Sample C3X output
A 3-streaming-unit job running 24/7:
azurerm_stream_analytics_job.events
└─ Streaming units (3 SU) 2190 SU-hours $240.90
Monthly $240.90Optimization tips
Common ways to reduce azurerm_stream_analytics_job cost without changing the workload.
Right-size streaming units to real throughput
~$80/month per removed SUSUs are provisioned, not auto-scaled to event volume. Monitor the SU utilization metric and provision for sustained load with headroom, not the rare peak. Each unnecessary SU is ~$80/month.
Stop non-production jobs when idle
Full SU cost during idle periodsA started job bills its SUs continuously. Stop dev/test and intermittent jobs when they're not processing — there's no charge while a job is stopped.
Tune the query to reduce SU pressure
Per SU reducedInefficient queries (unpartitioned, heavy joins, large windows) need more SUs for the same throughput. Partitioning the query lets it parallelize, often hitting the target on fewer SUs.
Consider alternatives for simple pass-through
Workload-dependentIf the job only routes or lightly filters events, an Event Hubs capture or a Functions consumer can be far cheaper than a continuously-running Stream Analytics job.
FAQ
How is Azure Stream Analytics billed?
Per Streaming Unit-hour while the job is running — about $0.11/SU-hour, so 3 SUs is ~$241/month. You provision SUs (the compute/memory allocation) and pay for them whenever the job is started, regardless of how many events arrive.
Does a Stream Analytics job cost money with no events?
Yes. A running job bills its provisioned SUs continuously, event traffic or not. Only stopping the job halts the charge — which is why idle non-production jobs are a common cost leak.
What are streaming units?
Streaming Units are the unit of compute and memory allocated to the job, setting how much throughput and query complexity it can handle. More SUs mean more capacity and more cost; you provision them rather than the service auto-scaling to event rate.
How does c3x estimate the cost?
From the streaming_units attribute, priced at the SU-hour rate, so an over-provisioned SU allocation shows its monthly cost before deployment.
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 azurerm_stream_analytics_job.