High inflation has been a drag on the U.S. economy this year, and many investors are worried about a recession. That fear triggered a sharp downturn in the stock market. The tech-heavy Nasdaq Composite is down 33.5% from its high, marking its steepest loss in the past decade, and many individual stocks have fallen even further.

For instance, Amazon (AMZN 1.60%) was valued at nearly $1.8 trillion last year, but the retail giant's share price plunged more than 49%, erasing more than $700 billion from its market cap. For context, Amazon has never lost so much value at any other point in the past 10 years, and the stock currently trades near a 52-week low.

That means investors have a once-in-a-decade opportunity to buy this trillion-dollar growth stock.

Amazon is battling rising costs and excess fulfillment capacity

Amazon struggled in this inflationary environment. Rising prices slowed consumer spending, and soaring costs (e.g., fuel, electricity) put pressure on cash flow. Of particular note, Amazon more than doubled its logistics footprint in response to tremendous demand during the pandemic, but that decision left the company with excess fulfillment capacity as demand evaporated.

Those headwinds translated into disappointing financial results throughout the year, and that trend continued in the third-quarter earnings report. Revenue jumped 15% to $127 billion, but operating costs grew more quickly, causing net income to fall 10% to $2.9 billion.

Fortunately, Amazon took steps to cut costs and utilize excess fulfillment capacity. Earlier this year, the company introduced Buy with Prime, a service that extends its fulfillment network to sellers' direct-to-consumer websites. It also debuted Amazon Warehousing & Distribution, a service that allows sellers to store products in Amazon distribution centers, making it possible to "seamlessly replenish" fulfillment center inventory as the need arises. Both initiatives should help Amazon utilize its logistics infrastructure more efficiently.

Looking ahead, Amazon might struggle in the near term, but the challenging macroeconomic environment is ultimately temporary, and it does not change the long-term investment thesis. Amazon has a strong market position in three quickly growing industries.

Amazon is synonymous with online shopping

Amazon is the most-visited online marketplace in the world, and the Amazon brand is synonymous with online shopping. In fact, more than 60% of U.S. consumers start their product search on Amazon, and the company will account for nearly 40% of retail e-commerce sales in the U.S. this year, more than the next 14 retailers combined, according to eMarketer. That puts Amazon in a great position. Retail e-commerce sales worldwide are expected to increase at nearly 14% annually to reach $15 trillion by 2030, according to Ameco Research.

To that end, investors can reasonably expect Amazon's retail business to generate double-digit revenue growth through the end of the decade. Of course, retail margins tend to be thin, and Amazon actually has more exciting growth opportunities in cloud computing and digital advertising.

Amazon's other earners

Amazon Web Services (AWS) was the first hyperscale public cloud, and it still offers a greater variety of services than any other cloud vendor. That advantage carried AWS to the top of the industry. It collected 32% of cloud infrastructure spending in the third quarter, more than Microsoft and Alphabet combined.

Better yet, research company Gartner recently crowned AWS the cloud innovation leader, explaining that the company has "materially more mind share" than all other providers. That ingenuity should keep AWS on the leading edge of the cloud industry. With that in mind, Grand View Research says the cloud computing market will grow at nearly 16% annually to hit $1.5 trillion by 2030.

Switching gears, Amazon nearly led the world in total ad revenue growth last year, according to eMarketer, and it ranks as the fourth-largest digital advertiser on the planet. That success stems from the popularity of its e-commerce marketplace and its Fire TV streaming platform, both of which have brands throwing ad dollars at the company. With that in mind, digital ad spending is expected to grow at 9.2% annually to reach $1.3 trillion by 2030, according to Precedence Research.

In short, Amazon established itself as a key player in cloud computing and digital advertising, and the company is growing significantly faster than the industry average in both cases. In the third quarter, cloud revenue climbed 27%, and ad revenue rose 25%. That means investors can reasonably expect double-digit sales growth in both businesses through the end of the decade, and that has big implications for Amazon's bottom line.

In the third quarter, AWS reported an operating margin of 26.3%, but the company rarely tops an operating margin of 5% in its retail business. Similarly, while Amazon does not disclose operating details about its ad business, it's reasonable to assume a 30% operating margin (or higher) there as well. That means Amazon should become increasingly profitable as cloud computing and digital advertising account for larger portions of total revenue.

Amazon stock looks cheap

Amazon currently trades at 2 times sales -- its cheapest valuation in five years. That price is more than reasonable for a company poised to grow sales at a double-digit pace through the end of the decade. That's why investors should jump on this rare buying opportunity.