What happened

Shareholders in Amazon (AMZN 1.30%) beat a rising market on Friday morning, with shares gaining 3% by 10:45 a.m. ET compared to a 1.4% boost in the S&P 500. The increase erased just a small portion of recent losses for the e-commerce giant's stock, though, which remains down roughly 30% so far in 2022

The rally was powered by a brightening outlook around economic growth and consumer spending.

A person shopping on a smartphone.

Image source: Getty Images.

So what

A major factor driving Amazon's stock higher on Friday was the boost in the wider tech world. Many e-commerce and tech peers, including Shopify and Etsy, were trading higher through the early morning hours. Amazon and these peers have all fallen by more than the market so far in 2022, but there are indications that consumer spending is holding up well as we head into the summer season.

Specifically, retailers including Macy's and Ulta Beauty announced solid sales, customer traffic, and earnings results in the past day. These reports contrasted with earlier updates from companies like Walmart and Target that appeared to show a bigger negative impact from inflation on shopping trends.

Amazon's business is dependent on economic growth to keep product sales rising, even though its cloud business is becoming a bigger factor.

Now what

Amazon shareholders should continue to see elevated volatility through updates that reflect whether the U.S. economy is approaching a recession. But the true returns from holding the tech stock will be driven by fundamental trends like the continuing shift toward e-commerce spending and the digital transformation that's driving more enterprises into cloud services.

As a leader in both of these growth spaces, Amazon is well positioned to capitalize on them, even if earnings are pressured over the next few quarters by slowing -- or negative -- economic growth.