There are lots of high-flying stocks catching investors' attention these days, but ignoring large, established leaders could be a big mistake. For example, Amazon (AMZN -1.45%) is in a perfect position to benefit from two huge opportunities.

Here's why buying Amazon now could allow you to tap into the growth of artificial intelligence (AI) cloud computing and digital advertising all at once.

1. AI cloud computing will be huge

The first reason to consider buying Amazon right now is that the company's AI opportunity is massive, given its recent investments in AI leader Anthropic and its cloud computing position.

On Nov. 22, Amazon announced that it invested an additional $4 billion in Anthropic, which makes the popular AI chatbot Claude, bringing its total investment in the company to $8 billion. The partnership makes Amazon the primary cloud provider for Anthropic and the "primary training partner" for the AI start-up.

This helps Amazon to stay at the forefront of AI cloud computing as it integrates Anthropic's services into Amazon Web Services (AWS). Rival Microsoft has similarly invested more than $13 billion into ChatGPT creator OpenAI as part of the AI-related arms race between major tech companies.

AWS is already growing at a healthy pace with sales increasing 19% in the third quarter to $27.5 billion. Amazon CFO Brian Olsavsky said on the Q3 earnings call, "Customers increasingly recognize that to get the true benefit of generative AI, they also need to move to the cloud."

The long-term benefit for Amazon is that global sales from the AI cloud computing market could reach an estimated $2 trillion by 2030, according to Goldman Sachs. As the leading cloud computing company with 31% market share, Amazon has a significant opportunity to benefit from any surge in AI cloud sales in the coming years.

2. Amazon's advertising business is expanding

Advertising probably isn't the first thing that comes to mind when you think about Amazon, but the company's ad business is experiencing impressive growth that's worth paying attention to.

Amazon's ad sales rose 19% in the third quarter to $14.3 billion. To put that in perspective, that's $1.7 billion more than what the company generated in annual ad sales just five years ago.

This growth has helped Amazon carve out a 13.9% share of the U.S. digital ad market, and that should expand to 17.3% of the market in 2026, according to eMarketer. Amazon's ad sales could reach an estimated $94.5 billion by the end of 2026, more than doubling its 2023 tally.

By 2030, 84% of U.S. ad spending will come from digital ads, per Statista, which gives Amazon more room to expand this fast-growing segment. The company's dominance in the e-commerce market and its push to offer more digital video content (Prime video, NFL, and NBA games) should help the company increase its ad sales.

Amazon isn't as expensive as you might think

Amazon stock isn't a bargain right now, but it might not be as expensive as you expect. The company's shares have a forward price-to-earnings ratio of 33.4 as of this writing, a modest premium to the S&P 500's forward P/E ratio of 27.8.

With the company's strong position in AI cloud computing and its expanding opportunity in digital advertising, it's still a good time to pick up Amazon stock.