Amazon (AMZN 6.39%) has rallied investors this month after promising quarterly results, with its stock up 6% since Aug. 1. After being one of the hardest-hit companies amid an economic downturn over the last year, the retail giant appears to be making a solid recovery. Meanwhile, its growing position in artificial intelligence (AI) could provide significant gains over the long term. 

However, before you go all in on Amazon stock, it's important to understand the positives and potential negatives of its business. So, here's one green flag and one red flag for Amazon in 2023. 

Green flag: A recovering e-commerce business 

Last year's macroeconomic headwinds caused steep declines in Amazon's retail business, with its e-commerce segments reporting operating losses totaling $10.6 billion in fiscal 2022. However, easing inflation and restructuring is paying off for the company. Moves such as closing or canceling construction on dozens of warehouses, layoffs, and shuttering some of its less profitable businesses reflected positively on earnings.

In the second quarter of 2023, Amazon's North American segment hit $3.2 billion in profits when the year-ago period came to a negative $627 million. Meanwhile, its international segment improved significantly. Retail growth bolstered Amazon's total operating income, which rose more than 130% year over year in Q2 2023.

Amazon's recovering e-commerce business comes as it is heavily investing in artificial intelligence (AI). Its retail segments became a weak point for the company over the last year. However, as profits in its e-commerce segments rise, the company has an increasingly lucrative outlook. In the coming years, Amazon could be home to a highly profitable retail business and a powerful position in AI.

Red flag: Slowing growth for AWS

Amazon Web Services (AWS) holds a leading cloud market share of 32%, which has consistently provided the company with significant earnings growth. However, rising interest rates over the last year caused companies to pull back on cloud spending and led to slowing growth for AWS, Amazon's most profitable business. 

In the fourth quarter of 2021, AWS hit revenue growth of 40% year over year. That figure has decreased every quarter since, falling to 20% in Q4 2022 and 12% in the company's latest earnings release (Q2 2023). The slowing growth is concerning as advances in AI have brought increased cloud competition. 

However, recent developments indicate AWS has the tools to retain its dominance over the long term. According to Grand View Research, the $137 billion AI market is projected to expand at a compound annual growth rate of 37% through 2030. Meanwhile, Amazon is heavily investing in the sector.

In June, AWS introduced several new AI tools geared toward various industries. Reuters reported last month that the cloud platform had attracted thousands of customers to its AI services, including organizations such as Sony, Ryanair, and Sun Life

Also, Amazon CEO Andy Jassy revealed in early July that the company is taking on AI chip developers like Nvidia by producing its own hardware. So far, the tech giant has created two chips, Inferentia and Trainium, which Jassy says will offer the best price-to-performance in the market. A venture into chips diversifies Amazon's position in AI and could bolster AWS' offerings by taking advantage of custom-made hardware.

Amazon's long-term potential has led to an average 12-month price target of $166, about 20% higher than its current position. With a consistently improving e-commerce business and promising moves in AI, the company will likely stick to its projected growth. 

Slowing growth in AWS is concerning. However, a boost from its e-commerce segments and a quickly expanding AI business could take it far over the long term and make its stock worth an investment this year.