← Articles

April 4, 2026 · Tim Fraser, Cloud Operations Lead

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.

A typical EC2-based store running three m5.large instances spends about $750/month on compute. At 50,000 orders per 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 typical cost is $200-800/month depending on instance size and whether you're running Multi-AZ. Divided across your transaction volume, this is often $0.005-0.02 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 most stores, CloudFront costs $0.001-0.005 per transaction — it's cheap relative to compute and database. 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, that's roughly 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. Supporting services: SQS for order queues, SES for confirmation emails, S3 for order data storage, CloudWatch for logging. Individually small, but they add another $0.002-0.01 per transaction.

Calculating your actual number

The total infrastructure cost per transaction for a typical mid-sized e-commerce store on AWS lands between $0.02 and $0.15. The range is wide because it depends heavily on:

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

If your average order value is $120 and your infrastructure cost per transaction is $0.04, AWS is negligible. But if you sell $8 digital products and your cost per transaction is $0.12, infrastructure is 1.5% of revenue — comparable to payment processing fees.

Knowing this number lets you make informed decisions: is it worth spending $5,000/year on reserved instances 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, 7 days, no charge. Or see the interactive demo →.