April 4, 2026 · Tim Fraser
Understanding Your AWS Cost Per Transaction
Most e-commerce teams know their customer acquisition cost, their average order value, and their gross margin. But very few know how much AWS infrastructure costs them per transaction. When someone buys a $45 item from your store, how much of that goes to compute, database, CDN, and data transfer?
This number matters. If your infrastructure cost per transaction is $0.03, it's irrelevant. If it's $0.85, it's eating your margin on low-value orders. You can't optimise what you don't measure.
Breaking down the cost per transaction
A typical e-commerce transaction on AWS touches several services. Here's how to think about each one:
Compute (EC2, ECS, or Lambda): This covers the application servers handling the browsing session, the cart logic, and the checkout flow. For EC2 or ECS, take your monthly compute bill and divide by total transactions. For Lambda, it's easier: you can see the cost per invocation directly in your billing data.As an illustration with round numbers (not a benchmark): if compute costs $750/month and the store takes 50,000 orders a month, that's $0.015 per transaction. But browsing traffic that doesn't convert still costs money, so the real compute attribution is higher.
Database (RDS or DynamoDB): Your product catalogue reads, inventory checks, cart storage, and order writes all hit the database. RDS pricing is straightforward: it's the instance cost plus storage plus I/O. DynamoDB charges per read and write capacity unit, which maps more directly to transaction volume.For RDS, the cost depends on instance size and whether you're running Multi-AZ. Using the same illustrative volume, a $500/month database works out to $0.01 per order. The hidden cost is read replicas: if you're running two replicas for your product catalogue, that doubles the database line item.
CDN (CloudFront): Product images, CSS, JavaScript, and static pages served through CloudFront. The cost depends on the size of your assets and how many page views each order generates. For many stores it's cheap relative to compute and database, but check your own bill rather than assuming. Data transfer: AWS charges for data leaving your VPC: to the internet, between availability zones, and through NAT gateways. If your average customer views 8 pages before purchasing and each page is around 2MB, that's about 16MB of transfer per order. Cross-AZ traffic adds up too: if your app servers and database are in different AZs, every query pays a $0.01/GB transfer fee each way (US East list price; check ap-southeast-2 in the AWS pricing calculator). Supporting services: SQS for order queues, SES for confirmation emails, S3 for order data storage, CloudWatch for logging. Individually small, but they add up per transaction.Calculating your actual number
There is no standard figure for infrastructure cost per transaction. It varies widely between stores because it depends heavily on:
- Whether you're using reserved instances or on-demand pricing
- How much browsing traffic you get relative to conversions
- Whether your architecture is efficient (connection pooling, caching, right-sized instances)
- Your data transfer patterns (single region vs multi-region, cross-AZ traffic)
To calculate yours: take your total monthly AWS bill, subtract any non-production costs (dev environments, staging, CI/CD), and divide by your monthly transaction count. That gives you the blended cost per transaction.
For a more granular view, use AWS Cost Allocation Tags. Tag your production resources by function (compute, database, CDN, storage) and pull a monthly report grouped by tag. This shows you which layer is consuming the most per transaction.
Why this matters for your business
For example, if your average order value is $120 and your infrastructure cost per transaction is $0.04, AWS is a rounding error on that order. But if you sell $8 digital products and your cost per transaction is $0.12, infrastructure is 1.5% of revenue, which is worth watching alongside payment processing fees.
Knowing this number lets you make informed decisions: is it worth spending $5,000/year on reserved instances or Savings Plans to cut the per-transaction cost in half? Is the CDN configuration adding cost without adding speed? Should you invest in caching to reduce database load?
Getting visibility without the spreadsheet
Calculating cost per transaction manually means pulling data from Cost Explorer, cross-referencing with your order database, and building a spreadsheet that's outdated by the time you finish it.
plainfra gives you cost visibility in plain English. Ask:
> "Break down our monthly AWS costs by service and tell me what's driving the biggest spend."
You get a prioritised breakdown with dollar amounts, trends, and specific resources that are costing more than they should. No spreadsheet required.
Try plainfra free → 50K tokens, 48 hours, no charge. Weekly reports start on Core. Or see the interactive demo →.