Amazon (AMZN -0.70%) is a powerhouse name in the stock market, with soaring revenues, a key role in both e-commerce and cloud computing, and a market capitalization of more than $2.3 trillion.

But Amazon stock is only up less than 2% so far this year and its dominance in the cloud computing space is beginning to slip as rivals Microsoft Azure and Alphabet's Google Cloud make inroads. And President Donald Trump's on-again, off-again threat of tariffs is back on, with many set to go into effect in August, putting additional pressure on Amazon's e-commerce business.

If you're investing in Amazon stock, it's only natural to wonder how the company will protect its cloud computing dominance and begin elevating the stock price again. Here's the one thing you should be watching now.

A person picks up an Amazon package

Image source: Amazon.

For Amazon, follow the money

Amazon is a money machine. The company brought in $155.7 billion in revenue in the first quarter, up 8.6% from the previous year. Profits were also up, coming in at $17.1 billion and $1.59 per share versus $10.4 billion and $0.98 per share in the same quarter a year ago.

So as you can see, Amazon is spending that money almost as fast as it makes it. Where's it all going?

A lot of it goes into the e-commerce side, which is very expensive for Amazon to run. When you consider operating warehouses, maintaining a fleet of delivery vehicles, employee costs, merchandise, and managing the supply chain, there's a lot that goes into e-commerce that really eats into the company's profitability.

Segment

Q1 2025 Sales

Q1 2025 Expenses

Q1 2025 Profit Q1 2025 Margin
North America $92.88 billion $87.04 billion $5.84 billion 6.3%
International $33.51 billion $32.49 billion  $1.01 billion 3%
AWS $29.26 billion $17.72 billion $11.54 billion 39.4%

Data source: Amazon Q1 financial statement.

While Amazon's e-commerce is critical, I think that the better business right now is AWS because its margins are so much better. But it's that business that could be in jeopardy if Amazon's not careful.

In 2022, AWS commanded a 33% market share in the cloud computing space, with Microsoft Azure at 22% and Google Cloud at 10%. But by the end of 2024, Amazon slipped to just a 30% share, with Google Cloud gaining to 12%.

The big three cloud computing companies, along with smaller competitors like Alibaba, Oracle, Salesforce, International Business Machines, and Tencent, are spending massively to build more capacity and features in their cloud platforms. Much of Amazon's money is being spent on new Nvidia chips to power artificial intelligence and products featuring large language modules, as well as its AWS Trainium chip, which is used for AI and machine learning applications.

That's why Amazon's spending is taking off in recent years -- and why it free cash flow is starting to dip. Amazon spent $83 billion on capital expenditures last year, and is expected to spend more than $100 billion this year. Its Q1 spending was $24.3 billion.

AMZN Free Cash Flow Chart

AMZN Free Cash Flow data by YCharts

"The majority of the spend is to support the growing need for technology infrastructure. This primarily relates to AWS as we invest to support demand for our AI services, and increasingly in custom silicon like Trainium, as well as tech infrastructure to support our North America and international segments," CFO Brian Olsavsky said during the company's first quarter 2025 earnings call.

The bottom line

Amazon needs to be spending this money right now. AWS is too important to the company's bottom line. And as companies turn to cloud-based solutions to run their generative AI programs, Amazon has a rare opportunity to reshape itself into a dominant AI-as-a-Service company with margins that far outstrip anything that its e-commerce side could do.

So if I'm an Amazon investor, I want to see that capex number grow. I want Amazon to be investing in making its data centers better, faster, and more adaptive to anything that its customers want to ask of them. I want Amazon to maintain its lead in the cloud computing space and push back the competition. All that is going to cost money.

Amazon is a great company, but its stock is a little bit in a rut right now. It needs to maintain and expand its position as the No. 1 company in cloud computing, and that's why I'm watching the capex spending very closely right now.