Over the last two decades, Amazon (AMZN 1.71%) has been one of the stock market's biggest winners. The company's share price has soared over 7,100% over the last 20 years -- good enough to turn a $1,000 investment into more than $72,000. On the other hand, the e-commerce and cloud computing giant has been facing some business headwinds lately, and its share price trades down roughly 34% from its high.

Is Amazon still a smart investment at today's prices? Read on to see competing bullish and bearish takes on the company from two Motley Fool contributors. 

Bear case: Amazon's growth is slowing in all the wrong places

Parkev Tatevosian: My bear case for Amazon centers on its low-margin e-commerce business and is worsened by a meaningful slowdown in its Amazon Web Services (AWS) segment. The latter had fueled the company's profits for years while management spent the proceeds building its e-commerce business. However, after years of rising competition, AWS is experiencing significant headwinds.

In the most recent quarter, AWS revenue increased by 16% from the year prior, compared to the 40% growth rate it achieved in the first quarter of 2021. The segment's growth rate has decelerated in the last five quarters. To make matters worse, aggressive investments made in its e-commerce business in the depths of the pandemic have decreased profit margins on that side of the business.

Amazon's stock price has benefited in recent weeks due to the rising expectations that large language models will lead to surging demand for cloud computing. While that may be true, Amazon is no longer the only game in town, with Microsoft (MSFT 0.27%), Alphabet (GOOG 0.41%) (GOOGL 0.37%), and others boasting cloud computing segments that are viable competitors.

If investors were enthusiastic about rising cloud computing demand driven by artificial intelligence (AI), Microsoft and Alphabet would make for better investments. The two are trading at better valuations and are not bogged down by a capital-intensive e-commerce segment.

Bull case: Amazon is built to win long-term

Keith Noonan As my colleague notes above, Amazon's profit-driving AWS segment is seeing some growth deceleration. Along with a sales-growth slowdown and margin contraction for the cloud-infrastructure unit, the company's e-commerce business continues to have very high operating costs and is expanding at a relatively slow rate these days.

With guidance for total sales between $127 billion and $133 billion in the current quarter, Amazon's midpoint target calls for revenue growth of 7.5% year over year. It's fair to say the company's near-term performance outlook is a departure from the kind of growth that many shareholders had become accustomed to, but I think the stock remains an attractive play for long-term investors. 

While Amazon faces some strong competitors in the cloud services space, AWS remains the market leader and looks well-positioned to capitalize on growing industry demand. Much of the recent growth slowdown stems from macroeconomic headwinds that should eventually dissipate, and it's likely Amazon will be one of the biggest beneficiaries of AI-driven demand even if its competitors also benefit from the trend. 

I also think it would be a mistake to underestimate the long-term opportunities presented by the e-commerce business. Indeed, online retail isn't contributing much to the company's bottom line right now, but Amazon has built what looks to be almost insurmountable competitive advantages in the space and will likely be able to boost profitability significantly over time.

Advancements in AI, warehouse automation, and autonomous delivery have the potential to significantly reduce operating expenses and power much greater earnings growth. And with the company's digital advertising business growing 23% year over year to reach roughly $9.5 billion in revenue in the first quarter, Amazon is already showing that it can leverage its market-leading e-commerce platform to take advantage of other high-margin growth opportunities. 

While the business is facing some pressures right now, Amazon stands a good chance of delivering market-beating returns over the next decade and beyond. 

Should you buy Amazon stock today?

For investors looking for dedicated software and AI stocks, other companies would probably make better portfolio fits. Amazon's e-commerce business still accounts for the large majority of its revenue, and that suggests that the current AI software boom will play a smaller role in lifting the company's overall performance compared to more software-centric businesses.

On the other hand, Amazon is a great company and retains leadership in the e-commerce and cloud infrastructure markets. For long-term investors seeking exposure to both of these industries, the stock could be a smart portfolio addition.