Tuesday brought some turbulence to Wall Street as investors weighed the potential impact of economic sluggishness on the stock market. The Nasdaq Composite (NASDAQINDEX: ^IXIC) rose slightly to hit new records once again, but the Dow Jones Industrial Average (^DJI -0.98%) and the S&P 500 (^GSPC -0.46%) pulled back from the recent strong performance.

Index

Percentage Change

Point Change

Dow

(0.60%)

(209)

S&P 500

(0.20%)

(9)

Nasdaq Composite

+0.17%

+24

Data source: Yahoo! Finance.

Even as market participants tried to parse through everything going on in the global economy, a couple of tech stock  giants continued to show their success. Amazon.com (AMZN -1.65%) rose to a new record, while Apple (AAPL 0.52%) hit new 52-week highs and is now within just a few percentage points of climbing to all-time heights. We'll look more closely at both companies below.

Three people in front of screens showing stock charts and financial news.

Image source: Getty Images.

Will Amazon get a do-over?

Shares of Amazon.com were up nearly 5% on Tuesday. That sent the e-commerce giant's market capitalization up to $1.85 trillion and helped the stock break higher after having treaded water throughout much of the past year.

The immediate catalyst for Amazon's rise was the U.S. government's decision to reconsider a key contract award. The Department of Defense (DoD) had awarded its $10 billion Joint Enterprise Defense Infrastructure contract to Microsoft (MSFT -2.45%) in late 2019, defying many investors' expectations that Amazon would win the award. However, the Pentagon canceled the contract, arguing that the pace of technological advancement has been fast enough to make its initial requirements under the contract insufficient to keep up with changing needs.

Now, it's likely that the government will break up the old project, and the Defense Department specifically named both Microsoft and Amazon as "the only Cloud Service Providers capable of meeting the Department's requirements." In the end, that means Amazon and Microsoft are likely to share what might otherwise have gone solely to Microsoft, and that means a net win for Amazon. Microsoft's stock finished almost unchanged on the day.

Of course, $10 billion is just a drop in the bucket for Amazon. Yet the reputational benefits of a DoD contract win would be substantial, and it validates Amazon's decision to fight the government's initial award in the first place.

Apple looks healthy

Meanwhile, Apple climbed another 1.5%, boosting its market cap lead significantly. The move didn't quite set a new record, but it brought the Cupertino-based tech company to within striking distance of where it traded in January.

The move up comes after a quiet time for Apple stock, which had fallen 20% from its highs during the late winter and early spring. Investors had been pleased with how the iPhone 12 had performed, but they seemed concerned about whether the rollout of 5G networks around the world would progress at an adequate pace to drive sales of the smartphone going forward.

Now, though, investors seem to be focusing on the coming debut of the iPhone 13 -- or 14 if Apple decides to give in to triskaidekaphobia (fear of the number 13) and skip what many see as the unlucky number. Rumors about potential features are making the usual rounds, but what's clear is that Apple fans seem just as excited about future releases as they have been about recent ones.

That level of loyalty is Apple's greatest asset, and it'll be the key to drive further gains for the stock. If the holiday season goes well, then Apple could easily make further progress on the path to $3 trillion and beyond.