An industry analyst from JPMorgan Chase  recently published a note selecting Amazon (AMZN -1.64%) as a top investment idea, looking for a rebound in the retail business after a rough 2022. The company has been hit hard by factors outside of its control, and the retail challenges overshadowed other positives about the stock. There's evidence that Amazon could indeed return to being a darling of Wall Street in 2023, and here are three reasons.

1. Profitability could bounce back

Inflation ravaged the U.S. economy over the past year, and that dramatically affected Amazon, too. You can see below how Amazon's operating profit margin significantly declined over the past year. Management discussed various headwinds that brought margins down over the past two quarters, including inflation of costs throughout the business, inefficiencies in its fulfillment network after recently expanding it, and rising fuel and freight costs.

AMZN Operating Margin (TTM) Chart

AMZN Operating Margin (TTM) data by YCharts

The lower margins resulted in significant losses and free cash flow has been negative $29.7 billion over the past year. This massive hit to Amazon's pockets is likely a big reason the stock dropped 35% from its high.

There are some reasons for optimism. About 57% of Amazon's items sold in the e-commerce segment during the second quarter were from third-party sellers, an all-time high. Third-party sellers are independent vendors that pay Amazon for access to sell on its marketplace. It helps take some of the burdens of sourcing and inventory off Amazon's plate, making the company more financially light on its feet. If third-party sellers continue growing, it could help stabilize the company's profitability.

Additionally, the Federal Open Market Committee, which sets monetary policy for the U.S., is raising the federal funds rate to get inflation down. Investors should look for Amazon's profit margins to stabilize and begin rebounding as inflation eventually comes under control, hopefully over the coming quarters.

2. AWS remains a beast

Many retailers face similar headwinds, but few have a business like Amazon Web Services (AWS) in their back pocket. AWS is the company's public cloud platform. This business segment is its fastest-growing asset, increasing revenue by 33% year over year to $19.7 billion in the second quarter of 2022.

And it's Amazon's most profitable business. Operating income from AWS totaled $5.7 billion in the second quarter. The operating margin of 29% is far higher than Amazon's overall 2.7% and contributed 100% of the company's operating profits in the quarter. In other words, Amazon's financials would have been far worse without AWS.

It could become an even more crucial part of the company. Amazon expects steady long-term growth for AWS, which should contribute even more to the overall bottom line. The retail business still gets a lot of attention and makes up most of the total revenue, but investors should consider what AWS could grow into over the coming years.

3. The stock has become a bargain

That said, investors can get a fresh perspective on the stock's valuation. Now trading at a price-to-sales ratio of 2.5, the stock is roughly its cheapest since 2016. AWS was just 9% of sales that year, versus 13% in 2021. and will become a larger piece of the business as its growth outpaces retail. That's a good thing because it can move the needle in making Amazon more profitable overall.

AMZN PS Ratio Chart

AMZN PS ratio. Data by YCharts.

The retail business doesn't need to drive the bottom line as much; the true benefit of that operation is as a funnel to drive users into the company's ecosystem. Shopping online with Amazon typically translates to other business segments, including Prime subscriptions, Prime Video, advertising, and anything else the conglomerate might cook up. What matters is that operating margins stabilize, reining in the recent cash losses.

The current challenges facing the business have pushed the stock to its lowest valuation in years, but the company remains a leader both in e-commerce and cloud computing. Amazon is one of the world's largest tech companies, and it seems more likely than not that Wall Street will eventually look back on 2022 as the year to scoop up the stock at a great price.