What happened 

Shares of Amazon (AMZN -1.61%) declined on Tuesday after Walmart (WMT 1.34%) issued a tepid sales forecast for the year ahead. As of 12:35 p.m. ET, Amazon's stock price was down nearly 3%.

So what

Inflation may have peaked, but it's still denting consumers' budgets and forcing them to pare back their discretionary spending. That's the upshot of Walmart's fourth-quarter earnings report and conference call.

The retail colossus delivered relatively solid revenue and profits for the holiday selling season, but it warned that growth would be hard to come by in the coming year. Walmart expects its sales to grow less than 3% in its 2024 fiscal year, which began on Feb. 1. 

In an interview with CNBC, Walmart chief financial officer John Rainey said:

The consumer is still very pressured. And if you look at economic indicators, balance sheets are running thinner and savings rates are declining relative to previous periods. And so that's why we take a pretty cautious outlook on the rest of the year.

Now what 

Walmart's muted sales guidance and its management's commentary bode poorly for Amazon. The e-commerce leader has a smaller grocery business than Walmart, so it relies more on discretionary purchases to drive its online retail sales. Weaker discretionary spending could thus take a larger toll on Amazon's profits.

That said, Amazon CEO Andy Jassy knows this, so he's taking aggressive action to cut costs to bolster the company's margins. Amazon said in January it would lay off more than 18,000 workers. Additionally, Jassy made the decision to close many of Amazon's brick-and-mortar stores. He's also prioritizing initiatives that can improve the efficiency of the e-commerce giant's sprawling online fulfillment network.