What happened

Shares of Amazon (AMZN -1.44%) surged 12% on Thursday, following an encouraging inflation report and news of more cost cuts designed to bolster the online retail giant's profitability. 

So what

The Consumer Price Index -- a closely watched measure of inflation -- rose 0.4% in October and 7.7% year over year. That was down from highs near 9% earlier in the year and better than Wall Street and many economists feared. 

The news gave hope to investors that the Federal Reserve would soon be able to dial back its interest rate increases, potentially staving off a recession. The stock markets, in turn, rallied, with the S&P 500 and Nasdaq Composite rising a whopping 5.5% and 7.4%, respectively.

The positive inflation news also bodes well for Amazon. Higher costs for food, energy, shelter, and many other goods and services have forced many consumers to reduce their discretionary spending. That's taken a major toll on Amazon's online retail operations. Meanwhile, recession fears have driven many businesses to cut spending on technology and marketing, which has weighed on the growth of Amazon's cloud computing and adverting businesses. If these trends begin to reverse, the e-commerce titan's growth could reaccelerate.

Now what

Yet Amazon isn't just waiting for the tide to turn. CEO Andy Jassy is reportedly overseeing a large-scale cost-cutting review to rightsize the company's expenses and pare back unprofitable projects, according to The Wall Street Journal

The Journal's report was encouraging to investors concerned about Amazon's sagging profitability in recent quarters. Steeper cost cuts could not just stem losses, but also allow Amazon to harvest more profits from its colossal e-commerce and cloud computing operations when the economy eventually strengthens.