Jeff Barr recently posted his annual Prime Day by the numbers blog post, and I was immediately inundated by questions around “How much did this cost?”
There are a few answers possible, none of which are quite correct.
There’s an argument that in absolute terms the answer is “zero,” because it’s simply money transferring from one part of Amazon’s balance sheet to another — but that’s unsatisfying.
There’s the internal chargeback costs that AWS charges Amazon for services that would be subject to (at a minimum) significant discounting just due to volume, but also quite possibly modified at some foundational level. I don’t actually know how it works in practice (Amazon is not an AWS bill optimization customer of mine — YET!), and if I did, I wouldn’t be able to talk about it publicly.
So let’s use the only estimates that make sense here: what the on-demand cost of this would be, at retail pricing posted on the AWS website, assuming it’s all in us-east-1.
We’re going to include the numbers only for the 48 hours that Prime Day ran and not include any support charges (which you would be frankly nuts to not pay for at this scale). Further, nobody at this scale would ever actually pay retail prices, but it’s enough for a fun thought experiment. Let’s begin.
The cost analysis of Prime Day 2023
The by-the-numbers post gives us a list of some crucial usage numbers for our calculations, broken down by each AWS service.
Jeff tells us that Amazon added an incremental 163 petabytes of EBS storage capacity. Given that EBS comes in many different flavors, there’s a range here. If it’s gp3 (which is what most folks should start with), it’d be roughly $878,000, if it’s slow magnetic sc1 then it would cost $164,000, and if it’s io2 volumes, it soars to $3.4 million. In reality, it’s almost certainly a mix. Further, despite Jeff telling us that it served 15.35 trillion requests and 764 petabytes of data transfer per day, there’s no way to say what this cost (if anything) in terms of additional provisioned IOPS or throughput. I’ll mark it at zero, and assume it’s all gp3 volumes for simplicity.
EBS thus costs $878,003.00.
AWS CloudTrail processed over 830 billion events in support of this year’s Prime Day. This is kind of tricky to calculate along a few axes. If they were all management events, they were free for the first trail. Every additional management trail (usually configured by accident!) would add another $16.6 million for this charge. And if these were all data events, the cost would be $830K.
In all probability, these charges were a mix of both types of event. Let’s split the difference, be extremely charitable and assume there’s only one management trail, and call it 415 billion free management events and $415,000 for 415 billion chargeable data events.
CloudTrail thus costs $415,000.
DynamoDB processed “trillions of requests” and peaked at 126 million requests per second. This is so vague as to be fodder for absolute despair, but we can reason about this a bit.
We’ll disregard storage costs and only care about the transaction volume. Let’s also assume 50% read/write split, eventual consistency, and that we’ll have to provision for that peak throughout the whole 48 hours, since autoscaling DynamoDB is … laggy. This brings us to about $2.5 million. If you have a problem with this, or think I’m being unfair, remember that I could have instead said that this was all on-demand capacity instead, in which case the cost for this line item would instead be $249 million over two days.
DynamoDB costs $2,505,360.
This is incredibly hard to calculate; the numbers given include 5,835 database instances running the PostgreSQL-compatible and MySQL-compatible editions of Amazon Aurora that processed 318 billion transactions, stored 2,140 terabytes of data, and transferred 836 terabytes of data.
Let’s assume 2,000 MySQL instances, and 3,835 PostgreSQL instances, purely because “POST-gruh-SQUEAL” is incredibly fun to say. We’ll assume that these are the I/O Optimized option, because calculating out how Aurora accounts for IO charges is incredibly frustrating, and that they aren’t using either of the Aurora Serverless offerings for obvious expensive reasons..
Instance sizing is tricky, and it’s also everything to this calculation. RDS instances can each cost as much as $19,000 a month, or as little as $90. Let’s pick something middle of the road: the db.r6i.12xlarge, which comes in at $7,000 for a full month.
Smack these two groups together, and the MySQL instances cost $2,412,864, while the PostgreSQL instances cost $3,681,231 for these 48 hours.
The Aurora cost comes to $6,094,095.
Now, the only data available in this post states that “SES sent 56% more emails than last year.” However, Amazon separately stated that customers purchased 375 million items. While I could snidely suggest that each sale generated 40 emails, a quick check of my own purchase history indicates that every order spits out 3 emails: a confirmation, a shipment notification, and a delivery notification. While many orders were obviously multiple items, we’ll balance this out by ignoring all of the promotional email around Prime Day deals. That means that we’ll say SES sent customers 1.125 billion emails for Prime Day, and assume each one is 20KB. They talk about deliverability rates, which means they’re using SES’s rather snazzy Deliverability Manager, and that brings the cost of these billion-plus emails to a bit under $200K.
SES cost comes to $193,824.84.
Amazon CloudFront handled “a total of over 1 trillion HTTP requests during Prime Day.” This is not strictly accurate. I pay attention to these things, and I can assure you that every connection as a part of the shopping process is in fact HTTPS. In fact, [Amazon.com)[https://amazon.com] is on the HSTS preload list, which means that browsers will actively refuse to connect to that domain over HTTP. Why is this important? Because the public pricing for CloudFront shows that HTTPS requests cost more! Curiously, the AWS Pricing Calculator does not draw a distinction here at the time of this writing.
Also, CloudFront pricing varies depending upon where the user is requesting the data from, which makes accurate numbers impossible here. Let’s be incredibly generous to Amazon and pretend that all of this traffic came from the U.S. and Mexico, as those are the cheapest rates.
Jeff declines to state how much data was transferred, so we have to guess wildly here. Let’s assume 100 kilobytes per request, which comes out to 90 petabytes.
Requests plus data egress means that CloudFront costs a bit under $3 million for these 48 hours.
CloudFront costs us $2,928,161.
SQS processed a peak of 86 million messages a second, end of data. Hmm. That’s … a bit open-ended, isn’t it? Each second at that rate costs $34, and thus if this were sustained it would cost over $5.8 million for the whole 48 hours.
What makes this extra fun is that the AWS Pricing Calculator refuses to accept that this scale is possible; their form yells at you two orders of magnitude before you get to this number. This suggests that there’s a lack of scale imagination happening somewhere. As a result, I’m left to use the first tool in the Cloud Economist’s toolbox: arithmetic. Let’s round this to $2 million — I find that more than fair.
SQS costs $2 million.
Pinpoint sent “tens of millions of SMS messages.” OK, let’s assume 50 million, all to U.S. numbers. The cost for that is $0.00581 a message, so blowing up your phone is straight arithmetic. Note that the AWS Pricing Calculator directs you to an “SMS pricing tool” that is simply a table. This is a poor experience.
Pinpoint SMS costs $290,500.
Finally, we come to EC2. The assertion that Amazon “used tens of millions of normalized AWS Graviton-based Amazon EC2 instances” is not only vague, it’s a problem. The idea of “normalized instance hours” may make sense internally at Amazon, but I can borderline promise that it doesn’t make as much sense as you might hope for reasoning about your cloud costs. I will no doubt rant about this at a future date.
Okay, let’s assume 50 million “normalized instances,” which we’ll call c7g.medium since it’s directionally accurate. We’ll have to use arithmetic here, since the AWS Pricing Calculator refuses to believe that more than 50,000 EC2 instances are possible within a single region. Oh, honey — I have some of our mutual customers to introduce you to.
For these 48 hours, we do simple math.
EC2 costs $87,120,000.
The cost of Prime Day 2023
Adding all of these (again, inaccurate) numbers together demonstrates that at retail pricing, running the infrastructure for Amazon Prime Day for 48 hours would cost you $102,424,943.84.
While this is obviously way higher than reality, assume for a minute that it isn’t. $102 million in infrastructure spend for an event that brought in over $12.7 billion in sales isn’t the worst return on investment that companies could make — by a landslide!