Amazon (AMZN 2.50%) stock is racing toward a $1 trillion market cap, climbing to a price of more than $2,000 per share in the past week. Shares are up over 70% so far in 2018.

And there's good reason for the surge in share price: Amazon is showing sustainable profits. Morgan Stanley analyst Brian Nowak sees shares rising to $2,500 on the back of three profit centers for the online retailer: advertising, cloud computing, and subscription services. All three have significantly higher operating margins than Amazon's core retail business, and they're all growing quickly.

An Amazon truck.

Image source: Amazon.

A real competitor in digital advertising

Amazon has quickly grown its digital advertising business into a true competitor to Facebook (META 2.26%) and Alphabet's (GOOG 0.81%) (GOOGL 0.72%) Google. Last quarter, the company generated $2.2 billion in "other" revenue, which largely consists of advertising. That number is up 132% year over year.

Amazon's ad business is still relatively small compared to the $50 billion Facebook is set to bring in this year, or the $106 billion Google has brought in over the last 12 months. But its rapid growth has it on pace to become the third-largest digital advertiser in the U.S. by 2020, according to estimates from eMarketer.

Amazon is expanding beyond its core promoted products advertising into more video ads. It's placing ads within its live sports video content like Thursday Night Football. It's also showing ads before users stream content on Twitch. It recently removed ad-free viewing on Twitch for Prime members in an effort to boost the site's ad revenue to $1 billion per year.

Importantly, since Amazon is already operating its main website for its retail operations, and its video services are supported by its Prime Instant Video service, it can run its ad business at an extremely high margin. Digital advertising is already a relatively high-margin business to begin with. Facebook produced an operating margin of 50% last year, and Google's operating margin was 30%.

Considering Amazon is able to leverage its existing properties and build advertising products on top of them, investors should expect even higher profit margins from Amazon. In fact, it could be Amazon's most profitable business in just a few years.

Staying ahead in cloud computing

Amazon's cloud business, Amazon Web Services, is now on a $24 billion run rate. Importantly, sales at the cloud-computing division are accelerating, indicating that increased competition from Google isn't slowing it down.

Amazon is showing particular progress in signing long-term contracts with enterprises, a shift away from the pay-by-the-hour model it started in. Amazon reported a $16 billion backlog in AWS contracts with an average length of 3.5 years. That's up from $12.4 billion and an average length of 3.2 years in the previous quarter.

Amazon may be able to lock in customers longer as it leads the way in "serverless cloud computing" with AWS Lambda. Serverless cloud computing allows enterprises to easily switch to the public cloud by offloading server management to the cloud provider (for an additional fee). That means Amazon can increase its cloud revenue, its operating margins, and lock in customers for longer since there's an increased opportunity cost for switching to a new provider.

AWS already produces strong margins for Amazon -- 26.2% over the last 12 months. That number continues to climb as the operation scales.

Subscribing to further growth

Over the last few years, Amazon has greatly expanded its subscription services. On top of Amazon Prime, its core shipping and streaming video subscription, Amazon also offers subscriptions for audiobooks (Audible), e-books (Kindle Unlimited), video (Prime Video, Amazon Channels), and music (Music Unlimited), among other things. Last quarter, Amazon brought in $3.4 billion from its various subscription services.

The vast majority of that comes from its 100 million-plus Prime members around the world. Of course, that's the subscription Amazon would most like to sell consumers since Prime members spend more, on average, than non-Prime members on Amazon. Prime also creates a strong network effect, fueling both its third-party seller services and its advertising business.

But Amazon is also starting to push its other subscription services. It thinks its Music Unlimited service is ready to compete with the market leaders, and it says it already has over 20 million paid customers.

Subscriptions have less profit potential, but they do offer the chance for Amazon to lock in more customers to its ecosystem and drive profitable growth in other parts of the company. Combined with a rapidly growing advertising business and continued industry leadership by AWS, Amazon is poised to see significant profit growth for many years to come, and that should push it well past a $1 trillion market cap.