AWS Engineering: The Trade-off Between Observability and Cost
You can see everything happening in your AWS infrastructure. The question is whether you can afford to.
Observability on AWS is genuinely excellent. CloudWatch, X-Ray, CloudTrail, VPC Flow Logs, AWS Config, GuardDuty — the tooling exists to give you deep visibility into every layer of your system. Metrics, traces, logs, audit trails, network flows, configuration history. It’s all there.
It’s also expensive. And if you turn it all on without thinking, your observability bill will quietly become one of your largest line items.
This is the trade-off nobody talks about clearly enough when they’re setting up a new AWS environment. So let’s talk about it.
Why observability costs more than expected
Every data point you collect in AWS has a cost attached to it. CloudWatch charges for custom metrics, log ingestion, log storage, and dashboard usage. X-Ray charges per trace recorded and retrieved. VPC Flow Logs charges for the log data written to CloudWatch Logs or S3. CloudTrail charges for data events beyond the free management event tier.
None of these costs are large in isolation. A single Lambda function with detailed logging enabled costs almost nothing. A distributed system with twenty services, each logging verbosely to CloudWatch Logs, retained for ninety days, with custom metrics and X-Ray traces enabled across all of them — that scales fast.
The trap is that observability costs grow with your system’s activity, not just its size. A traffic spike that doubles your request volume also doubles your log volume, your trace count, and your metrics data points. Your infrastructure scales, your observability bill scales with it, and nobody planned for that.
The decisions that actually drive the bill
Log retention. CloudWatch Logs default retention is indefinite. Most teams don’t change it. Logs accumulate, storage costs accumulate, and nobody notices until the bill arrives. Set retention policies explicitly — thirty days is usually sufficient for operational logs, longer only for compliance requirements.
Log verbosity. DEBUG level logging in production is one of the fastest ways to inflate a CloudWatch bill. Every line logged is ingested and stored. Be deliberate about what log level runs in production versus what runs locally or in staging.
X-Ray sampling. Tracing every single request in a high-throughput service is rarely necessary and consistently expensive. X-Ray supports sampling rules — configure them to trace a meaningful percentage of requests rather than everything. One percent of traces from a service handling ten thousand requests per minute still gives you a thousand traces to analyse.
Custom metrics granularity. CloudWatch charges per custom metric per month. A metric published at one-second resolution costs more than the same metric at one-minute resolution. For most operational purposes, one-minute granularity is sufficient. High-resolution metrics are worth the cost for specific, critical systems — not as a default across the board.
VPC Flow Logs scope. Enabling VPC Flow Logs at the VPC level captures everything. Enabling them at the subnet or interface level gives you targeted visibility where you actually need it. Start narrow and expand only when investigation requires it.
What good looks like
The teams that handle this well don’t start with “what can we observe?” They start with “what decisions do we need observability to support?”
For operational health: you need enough metrics and logs to know when something is wrong and to identify the cause quickly. That doesn’t require logging every request body or storing logs for a year.
For performance analysis: you need traces through the paths that matter — the critical user journeys, the high-value transactions. You don’t need traces for health check endpoints or background jobs that run every minute.
For security and compliance: CloudTrail management events cover the vast majority of what you need for audit trails. Data events — logging every S3 object access, every DynamoDB read — are expensive and usually only warranted when compliance requirements explicitly demand them.
The principle is intentionality. Every observability component you enable should have a clear answer to: what question does this help me answer, and is the cost of answering that question worth it?
A practical starting point
If you’re building on AWS and want to be deliberate from the start:
Enable CloudTrail management events by default — they’re free and give you the audit trail you’ll need. Set CloudWatch Logs retention to thirty days on all log groups from day one. Enable X-Ray with a sampling rate of one to five percent rather than full tracing. Use CloudWatch alarms on the metrics that matter for uptime and performance, not on every metric available. Avoid VPC Flow Logs unless you have a specific security or debugging need.
Then revisit as the system matures. Add observability where gaps in visibility have actually caused problems. That’s more useful than comprehensive coverage that nobody looks at because the dashboards are too noisy to interpret.
Observability is not free, and that’s not a complaint — it’s a design constraint. The best AWS setups treat it as one. They observe what matters, at the resolution that matters, retained for as long as it matters.
Everything else is just cost with no signal attached to it.
Enjoyed this post?
Stay in the loop
New posts + weekly digest, straight to your inbox.
Create a free account
- Save posts to your vault
- Like posts & build history
- New-post alerts
No comments yet. Be the first to comment!