By DAMIAN J. TROISE and STAN CHOE

NEW YORK (AP) — U.S. stock indexes fell Friday, with much of the downward weight coming from a stumble for high-flying Amazon.

The S&P 500 lost 23.89, or 0.5%, to 4,395.26. But it nevertheless wrapped up its sixth straight month of gains, its longest such streak since 2018, and it's still within 0.6% of its record high set on Monday.

The Dow Jones Industrial Average fell 149.06, or 0.4%, to 34,935.47, and the Nasdaq composite dropped 105.59, or 0.7%, to 14,672.68.

Trading was mixed on Friday, with close to two stocks falling in the S&P 500 for every one that rose. Losses for banks and energy producers offset some modest gains for real-estate companies and raw-material producers.

Amazon dropped 7.6% after it reported sales growth for its latest quarter that, while still enviable at 27%, wasn't as strong as analysts expected. It also gave a forecast for revenue in the current quarter that fell short of Wall Street's.

Because Amazon is one of the biggest companies in the S&P 500, its stock movements carry extra weight on the index. It alone accounted for more than half of Friday's drop for the S&P 500.

Amazon was one of the biggest winners of the pandemic, which forced people to hunker down and shop from home. But people have been returning to stores and other pre-pandemic activities.

Digital pinboard and shopping tool company Pinterest ran into a similar issue during its latest quarter. Its stock slumped 18.2% after it reported slower growth than expected for its number of users.

It's been a busy week for earnings reports from companies, and roughly three out of five in the S&P 500 have now detailed their performance for the spring, according to FactSet. Profits so far have been blowing past the already lofty expectations Wall Street had set.

Perhaps even more important is how companies are doing it, said Sal Bruno, chief investment officer at IndexIQ.

"What's really encouraging is that the sales surprise is trending positive," he said. "That tells me that companies are growing, which goes along with the economic reopening."

So far, 88% of companies have reported even bigger sales for the latest quarter than analysts expected, according to FactSet. That's more than usual.

The strong earnings reports have helped to support the stock market, even as other worries have made trading more unsteady recently. Concerns are rising about whether a new variant of the coronavirus may dent the economy, while a crackdown by Beijing on Chinese tech companies has helped unsettle investors around the world. High inflation also remains a risk hanging over the market.

Treasury yields pulled lower following a spate of reports on the economy and inflation.

One showed that spending by consumers, which makes up the bulk of the economy, strengthened by more than economists expected in June. A key measure of inflation also accelerated to its fastest pace since 1991, but it wasn't quite as high as economists thought it would be.

Incomes unexpectedly rose for Americans in June, while their expectations for inflation were slightly lower than economists had forecast.

The yield on the 10-year Treasury fell to 1.23% from 1.27% late Thursday.

The market could be in for more choppy trading through August, Bruno said.

"The fundamental outlook is generally pretty strong going forward, even if there is some shorter term weakness and volatility," he said.