What happened 

Shares of Amazon.com (AMZN -1.14%) climbed on Thursday, following bullish remarks from the e-commerce-titan's leadership and better-than-expected consumer-spending figures. As of 2:33 p.m. ET, Amazon's stock price was up nearly 5%.

So what

Like many retailers, Amazon's profits have been dented by coronavirus-related supply chain disruptions and geopolitical-driven energy price increases. Higher product, freight, and fuel costs are ongoing challenges.

At the same time, Amazon is dealing with an excess of fulfillment capacity. The e-commerce giant invested tens of billions of dollars to build warehouses and other distribution centers to meet the torrid demand from online shoppers during the early stages of the pandemic. But with e-commerce sales slowing as more people return to traditional retail stores, Amazon now finds itself with too much warehouse space.

Several forklifts are parked in a nearly empty warehouse.

Image source: Getty Images.

During Amazon's shareholder meeting on Wednesday, CEO Andy Jassy acknowledged the problem and said the company was working to right-size its fulfillment network by delaying new builds and allowing some leases to expire. Jassy also said he was "quite confident" that Amazon would make use of its remaining capacity as sales grow.

Additionally, Jassy promised to return Amazon to a "healthy level of profitability" by prioritizing expense-reduction initiatives. "We have effectively lowered our cost structure before and I have high confidence that we'll get back on track as we work through these incredibly unusual past two years," he said. 

Now what

Inflation has also forced consumers to pull back on discretionary purchases. But consumer spending grew by 3.1% in the first quarter, according to a report by the U.S. Department of Commerce released on Thursday. That's up from a prior estimate of 2.7%. Stronger consumer-spending figures bode well for Amazon, which accounts for roughly half of all online retail sales in the U.S.

Moreover, if Jassy can deliver on his promise to rein in the company's costs, Amazon's profits -- and, by extension, its stock price -- could rebound faster than the market currently expects. That could lead to handsome gains for investors who buy shares today.