Amazon (AMZN -1.27%) shares are trending higher thanks to a fresh quarterly update that investors viewed in a positive light. Revenue of $134.4 billion was up 11% year over year, and diluted earnings per share totaled $0.65, compared to a $0.20 loss last year. Both headline figures crushed Wall Street expectations. 

The tech giant is experiencing strong momentum across its business right now. But are Amazon shares, which are up 10% the day following the announcement, worth buying right now? Here's what investors need to know about this FAANG stock. 

A closer look at the second quarter 

There are two storylines that investors can focus on right now. The first has to do with Amazon posting double-digit revenue growth last quarter. During the first three months of 2023, the business was only able to post sales gains in the single digits. For a company as big as Amazon, it's impressive to see expansion at this pace. This just means that the end markets that it offers products and services in still have sizable expansionary runways. 

This could also potentially be a sign that the operating environment is stabilizing, particularly as the overall economy shows its resilience with inflation cooling and unemployment so low. All the other tech behemoths, including Apple, Alphabet, Microsoft, and Meta Platforms, beat consensus analyst top-line estimates. 

The second story that's very encouraging for investors is Amazon's surge in profitability. The net loss totaled $2 billion in the year-ago period, only to jump to a $6.8 billion profit last quarter. Like many of its tech peers, Amazon embarked on notable cost-cutting measures, as exemplified by reducing its head count by 27,000 employees since late last year. Consequently, the company's operating margin was 5.7% in Q2, up from 2.7% in the second quarter of last year. 

It looks like the good times will continue rolling. Management expects revenue growth between 9% and 13% for the current quarter, with operating income forecast to soar 180% (at the midpoint). 

Strength in key business segments 

The most important part of Amazon's business, and probably what most investors are familiar with, is its e-commerce operations. Amazon's online stores posted 5% sales growth after not growing at all in Q2 2022. This segment accounted for 39% of total revenue last quarter, so it's vital to Amazon's success. 

With artificial intelligence (AI) on everyone's mind, it's not surprising that this topic was a key part of the Q2 2023 earnings call. "Inside Amazon, every one of our teams is working on building generative AI applications that reinvent and enhance their customers' experience," CEO Andy Jassy mentioned. 

Amazon Web Services (AWS), the leader in the cloud industry, will undoubtedly be a huge innovation hub in terms of integrating AI throughout its offerings. Jassy pointed to how the "core of AI is data." Because Amazon has the largest customer base in the cloud arena, with the most data collected, it is in prime position to be at the forefront of the AI revolution. 

Sales at AWS rose 12% year over year, a slowdown from prior quarters. But the operating margin of 24.2% was still outstanding. 

It's hard not to like the stock 

Thanks to the strong momentum Amazon is experiencing, there's a lot to like about the business right now. Revenue is reaccelerating and profits are rising, with strength across all operating segments. 

Shareholders have taken notice of this, and that's why the stock is up an impressive 69% in 2023 (as of Aug. 4). Still, it only trades at a trailing price-to-sales multiple of 2.7, which is below its trailing-10-year average of 3.1. And besides the last year or so, Amazon hasn't traded this cheaply since 2017. 

As a dominant enterprise that touches the lives of consumers and businesses on a daily basis, and that still has ample growth opportunities ahead, Amazon deserves a spot in your portfolio.