intermediate

Cost awareness

Estimate and monitor cost drivers such as compute time, egress, storage class, request volume, idle resources, and managed-service tiers.

Cloud cost awareness means designing and operating systems with measurable spend: compute hours, request counts, storage GB-months, egress terabytes, and managed-service tiers. FullStack engineers influence cost through autoscaling bounds, cache hit ratio, log verbosity, database instance size, and serverless memory settings.

| Driver | Lever | |--------|-------| | Idle compute | Scale to zero, right-size instances | | Egress | CDN, compress assets, same-region traffic | | Storage class | Lifecycle to infrequent or archive | | Logs/metrics | Sampling, retention, cardinality caps |

Tag resources by team, service, and environment. Set budgets and anomaly alerts before launch, not after the first invoice shock. Review NAT gateway, unused IPs, and orphaned volumes monthly.

On interviews: top cost drivers for a typical web app, FinOps vs engineering responsibility, reserved capacity vs on-demand, and optimizing Lambda memory vs duration billing.

Common pitfalls: verbose debug logs in production; over-provisioned staging mirroring prod tier; CDN bypass causing egress storms; unbounded S3 uploads without lifecycle.

The trade-off is performance and redundancy headroom versus ongoing spend and the engineering time to optimize.

Checklist:

  • Tag and allocate cost by service and env.
  • Set budgets/alerts on accounts or projects.
  • Measure egress and cache hit ratio after deploy.
  • Right-size non-prod and automate shutdown schedules.