Amazon's (AMZN -0.27%) stock plunged nearly 50% in 2022 over concerns about profit declines in its retail segments. Its shares are up 52% so far in 2023 as its e-commerce business recovers from macroeconomic headwinds and the company expands its efforts in artificial intelligence (AI). The fall and partial recovery illustrate the importance of holding on to great stocks during a market downturn.

Despite the solid financial recovery and the promising outlook in AI, Amazon's stock still has some ways to go before being considered a bargain buy. Amazon shares remain on the pricier side in terms of valuation, so it's worth learning more about this company before loading up on its stock. 

As you analyze the stock as a potential long-term buy, here's one green flag and one red flag for Amazon in 2023. 

Green flag: Amazon is prioritizing profitability   

In fiscal 2022, Amazon reported $10.6 billion in operating losses between its two e-commerce segments. The company struggled as concerns about inflation dampened consumer spending. Management responded to the declining financials by enacting several restructuring moves, such as shuttering unprofitable programs like Amazon Care, closing dozens of distribution warehouses, and laying off thousands of workers.

The changes have paid off this year, with Amazon's North American segment returning to profitability in the first quarter of 2023 and hitting over $3 billion in operating income in the second quarter. The company's international segment still has a way to go before being profitable again, but its losses have decreased each quarter. Its improving retail business shows its resilience and ability to respond accurately to challenging market conditions. 

Amazon recently underscored its focus on profits by announcing the introduction of ads on its streaming platform, Prime Video. Starting this month, members in the U.S. will be able to choose between Prime Video with ads for a monthly price of $14.99 and an ad-free version for $17.98. Meanwhile, Prime members will soon receive an email on how they can upgrade to ad-free. 

Increased competition in the streaming market has massively decreased the profitability of most streaming platforms. As a result, market leaders like Walt Disney, Netflix, and Warner Bros. Discovery have all increased prices and introduced ads to their streaming services. Amazon's decision to follow suit adds another revenue stream and helps finance the content it provides to its subscribers. 

Last year wasn't easy for the company, but its forced restructuring has likely put it on a better financial path for the long term, which could be worth investing in.

Red flag: An expensive investment option 

Amazon's financials are making a solid recovery, but the company still has a way to go before returning to its pre-2022 form. The chart below shows how annual operating income has decreased nearly 47% since 2021 because of last year's declines.

AMZN Revenue (Annual) Chart

Data by YCharts.

Revenue continues to rise, and quarterly results in 2023 show Amazon is back on a growth path, but its poor form last year hurt the value of its stock.

Amazon's price-to-earnings (P/E) ratio of 102 is one of the highest among the tech giants, suggesting there are cheaper investing options in the sector. The table below includes the "big five" of tech and illustrates the significant margin between Amazon's P/E and its competitors. 

AMZN PE Ratio Chart

Data by YCharts.

Some of the biggest reasons to invest in Amazon are its leading market share in cloud computing and its massive potential in AI, but Microsoft (MSFT -0.37%) and Alphabet have growing positions in both industries and trade at far cheaper valuations.

Microsoft's presence in the market provides a far more affordable investment option than Amazon. It has access to cutting-edge AI technology with its large stake in OpenAI, it's home to the world's second-largest cloud platform, and it doesn't have the same vulnerabilities to economic declines as Amazon because it's not as active in e-commerce.

Amazon's restructuring moves over the last year have undoubtedly put it on a healthier financial path and a promising growth trajectory. But it might be best to look at other, more reliable tech stocks for now and wait for its shares to come down to a more attractive price point.