AWS X-Ray cost: per trace recorded and per trace scanned
X-Ray bills about $5 per million traces recorded and about $0.50 per million traces retrieved or scanned, with a free tier. Sampling is the main lever, since you rarely need every request traced. Here is how the tracing model prices.
Quick answer
X-Ray charges about $5 per million traces recorded and about $0.50 per million traces retrieved or scanned, with a monthly free tier. Cost tracks how many traces you record, so sampling (recording a representative fraction of requests rather than all of them) is the main lever. You rarely need every request traced to understand behavior.
AWS X-Ray provides distributed tracing across your services. Its pricing is simple: you pay for the traces you record and the traces you read back. Because a high-traffic service produces enormous trace volume if it records everything, sampling is the control that keeps X-Ray affordable.
Recorded and scanned traces
| Dimension | Rate (approximate) |
|---|---|
| Traces recorded | ~$5 / million |
| Traces retrieved or scanned | ~$0.50 / million |
| Free tier | Monthly allowance of recorded and scanned traces |
Recording is the larger charge; retrieval and scanning (querying traces in the console or API) are cheaper. A monthly free tier covers small workloads, but a busy service recording every request passes it quickly.
Sampling is the main lever
You do not need to trace every request to understand a system. X-Ray sampling rules let you record a representative fraction, for example one request per second plus a percentage of the rest, which captures the behavior and the errors while recording a small share of total traffic. Tuning sampling down on high-volume, low-value paths is the highest-impact X-Ray saving.
Controlling X-Ray cost
Set sampling rules that record enough to diagnose issues without tracing everything, sample high-volume health checks and static paths minimally, and rely on the free tier for low-traffic services. The discipline is the same as controlling metrics and logs cost: capture what you will actually use, sample the rest.
FAQ
How is AWS X-Ray priced?
About $5 per million traces recorded and about $0.50 per million traces retrieved or scanned, with a monthly free tier. Recording is the larger charge, and cost tracks how many traces you record, so sampling is the main control.
How do I reduce X-Ray cost?
Use sampling rules to record a representative fraction of requests rather than all of them, sample high-volume health checks and static paths minimally, and rely on the free tier for low-traffic services. You rarely need every request traced to understand behavior.
What is X-Ray sampling?
A mechanism to record only a fraction of requests as traces, for example one per second plus a percentage of the rest. It captures representative behavior and errors while recording a small share of total traffic, which is the highest-impact way to control X-Ray cost.
Do I need to trace every request?
No. A representative sample captures system behavior, latency distributions, and errors without the cost of recording every request. Tracing everything on a high-traffic service produces enormous trace volume for little additional insight, so sampling is standard practice.
Does X-Ray have a free tier?
Yes, a monthly allowance of recorded and scanned traces that covers small workloads entirely. Beyond it you pay per million traces recorded and scanned, so keeping recording sampled helps stay within or near the free tier.
Does C3X estimate X-Ray cost?
X-Ray cost is driven by trace volume, a usage input tied to traffic and sampling. C3X prices the surrounding infrastructure, and you model recorded trace volume to estimate the per-million charge.
What to do next
Estimate the infrastructure around your tracing before you deploy. C3X reads your Terraform and prices your resources against a live catalog. Start with the quickstart.
Share this post
Try C3X on your own Terraform
Free and open source. No API key required. One command to install, one command to estimate.