You probably think of e-commerce when you think of Amazon (AMZN 0.29%). But the company's biggest profit driver generally has been its cloud computing business, Amazon Web Services (AWS). For instance, in 2021, AWS's operating income represented more than 70% of the company's total operating income.

AWS even held up well during most of last year's economic troubles. But in the past few months, clients have started watching their budgets -- and that's hurt AWS's operating income. Despite this, the business's long-term picture remains bright. In fact, Amazon has offered us two signs that AWS is set to win over time. Let's check them out.

1. A focus on supporting clients

AWS serves a wide range of clients for various exciting projects. And it continues to win new ones. For instance, Zurich Insurance Group is moving its information technology infrastructure to AWS -- this will include more than 1,000 applications over the coming three years. All of this has helped AWS post double-digit revenue increases quarter after quarter.

At the same time, though, AWS's operating income went from gains in the third quarter of last year to declines over the past two quarters. That's as many clients find themselves watching their budgets. To address the situation, AWS is helping them spend less on cloud services right now. Yes, you read that right. AWS is nudging clients toward its lower-priced options.

This hurts earnings in the near term, but it's an excellent long-term move because it ensures clients will stick with AWS. And when their spending power increases, guess where they'll invest? In higher-priced options at AWS -- the service provider that helped them get through tough times.

"We're not trying to optimize for any one quarter or year," CFO Brian Olsavsky said during the first-quarter earnings call. "We're working to build customer relationships and a business that will outlast all of us."

That means the AWS operating income slowdown isn't a reason to panic. Instead, it shows how serious Amazon is about maintaining its clients' loyalties.

2. Investments in artificial intelligence

Amazon isn't new to artificial intelligence (AI). It uses AI throughout its business. For instance, machine learning helps Amazon recommend products to you on the e-commerce site and is built into Amazon devices like Alexa.

But AWS has taken some steps recently that could help it stand out over time -- and that should keep AWS at the head of the cloud computing pack. The cloud giant has launched several tools that will help clients leverage generative AI without having to start from scratch.

There are three different aspects of this. First, there are chips that power machine learning training and others that power predictions. In the first quarter, AWS unveiled its new versions of both types of chips. Second, AWS offers foundational models companies can customize and use for their own AI needs. AWS launched the Bedrock product last month.

Finally, AWS is boosting developers' efficiency through CodeWhisperer. This tool assists developers in writing code for a specific application -- so they can dedicate their time to other tasks.

Though Amazon is cutting spending in certain areas this year, it's continuing to invest in AWS technology and AI. The company predicts new cloud business in the coming years will stem from a "pending deluge of machine learning."

Should you buy Amazon?

These positive signs add to evidence AWS will continue being a profit driver for Amazon over time. Even though the business is seeing a slowdown right now, it's important to remember that it's due to today's economic environment -- not to elements specific to AWS.

Meanwhile, AWS supports its customers and invests in key growth areas such as AI. All of this is reason to be excited about this business's future. Considering AWS's importance in Amazon's profitability picture, there's reason to be excited about Amazon, too. And that makes Amazon a top stock to buy right now.