OK, so maybe Jeff Bezos isn’t quite going out on top.

The final quarter for Amazon.com under the direct management of its famous founder turned out to be a bit of a letdown. Revenue and operating income for the second quarter both fell shy of Wall Street’s estimates, as did the high end of the company’s revenue forecast for the current quarter. It was the first time the e-commerce titan missed the high end of its own sales projections in two years, according to data from FactSet. Amazon’s shares fell more than 7% following the results.

The company is still a juggernaut. Second-quarter revenue rose 27% to $113.1 billion, bringing trailing 12-month sales to more than $443 billion. That puts Amazon well on pace to overtake Walmart as the largest U.S. company by annual sales some time next year, while still growing at double-digit rates. Growth at the company’s crucial AWS cloud business also picked up, with revenue jumping 37% year over year compared with a 32% rise in the last quarter. That lines up with trends shown by cloud rivals Microsoft and Google earlier this week, suggesting that the market leader, AWS, is at least holding its ground.

But the boom in online sales Amazon enjoyed at the start of the pandemic created a challenging comparison for the most recent quarter. Thursday’s results confirmed the suspicions of some analysts that the company’s Prime Day sales event in late June underwhelmed. Amazon’s online stores segment saw revenue grow by only 16% to $53.2 billion in the second quarter, falling well short of analysts’ targets. Revenue growth from third-party and subscription services decelerated. Advertising revenue, reflected in the company’s “Other” segment, showed a strong jump of 87% year over year to $7.9 billion. But advertising still contributes only about 7% to Amazon’s total revenue.

The results create a bit more of a challenging setup for new CEO Andy Jassy as Amazon will face difficult comparisons for the rest of the year following its pandemic-fueled sales jump in 2020. But the bar seems low enough. The midpoint of the company’s revenue projection for the third quarter represents growth of 13% year over year. That would be Amazon’s slowest growth rate in 20 years, even with the pandemic picking back up and possibly driving more sales online.

Amazon’s new boss has plenty to do.

Write to Dan Gallagher at dan.gallagher@wsj.com