Image source: Amazon.

Let's face it: Amazon (AMZN -1.11%) stock is expensive. Everyone's favorite online retailer, which is valued at around $300 billion, barely, and inconsistently, turns a profit. The price-to-earnings ratio is measured in the hundreds, and while the company appears to generate billions of dollars in cash flow each year, that number is greatly inflated thanks to the magic of lease accounting, not to mention stock-based compensation.

When it comes to investing, the best way to reduce risk is by paying less. While Amazon may not seem that risky, given its dominant status in the e-commerce and cloud computing markets, even the best company makes for a terrible investment if the price is too high. There are better, more reasonably priced options available.

The other retail giant

Image source: Wal-Mart.

While Amazon may be the king of online retail, Wal-Mart (WMT -0.32%) still sells nearly $500 billion of goods each year, mostly through its more than 11,000 locations worldwide. Like most traditional retailers, Wal-Mart has watched Amazon grow into a force of nature. While online sales still only account for about 7.5% of total retail sales in the United States, Wal-Mart is now ramping up its e-commerce investments in an effort to compete.

The company is investing heavily in a variety of initiatives, some in an effort to improve the quality of the customer experience in its stores, and others with the goal of pushing back against Amazon. Wal-Mart recently enacted a wage boost for all of its employees, bringing the minimum hourly wage for current associates to $10 an hour. Wal-Mart hopes that higher pay, along with new training programs and more transparent scheduling, will improve employee productivity and ultimately make shopping at Wal-Mart more enjoyable.

On the e-commerce front, Wal-Mart is ramping up capital spending. During fiscal 2015, the company spent $11.1 billion on capital expenditures related to its stores, and just $0.7 billion on e-commerce. In fiscal 2017, Wal-Mart plans to reduce store investments to $9.9 billion, while bringing e-commerce investments up to $1.1 billion. The company aims to grow its e-commerce sales by 20% to 30% per year.

One initiative that could have legs is online grocery pickup. Wal-Mart recently announced an expansion of the service, which allows customers to order groceries online and pick them up curbside at a Wal-Mart store for free. Wal-Mart's vast network of stores, and its ability to provide the service without any additional fees, could give the company a major advantage in the burgeoning online grocery industry.

All of these investments are taking a toll on the bottom line. Wal-Mart's earnings declined in 2015, and it expects another 6% to 12% decline this year. Growth is expected to return next year, assuming these initiatives pay off, but investors have been less than pleased. Shares of Wal-Mart are down 15% from the 52-week high, and that's after a major recovery over the past few months. The stock trades at about 17 times the low-end of company's guidance for EPS this year , which is not particularly cheap. But with earnings depressed and significant earnings growth potentially around the corner, Wal-Mart looks like a better option that Amazon.

The other cloud computing king

Image source: Microsoft.

Amazon Web Services gets most of the attention when it comes to cloud computing infrastructure. The company offers infrastructure-as-a-service and platform-as-a-service products, allowing clients to pay for only the computing services that they use. During 2015, AWS generated $7.9 billion of revenue, making it the largest IaaS provider.

Microsoft (MSFT -0.66%) is also a major player in the cloud computing market, and although the company obfuscates its cloud results, making it difficult to tell how much IaaS and PaaS revenue it's generating, cloud is a core focus of the company. The Intelligent Cloud segment, which includes Azure, Windows Server, SQL Server, and Visual Studio, generated $6.3 billion in revenue during the fiscal second quarter alone. This number doesn't even include software-as-a-service revenue from Office 365, Dynamics, and other software products. These results are instead lumped into a different segment.

The growth prospects of Azure are just as bright as AWS, but Microsoft stock trades at a far lower multiple than Amazon. Backing out the cash net of debt on Microsoft's balance sheet, which totaled $59 billion at the end of 2015, shares of Microsoft trade for 18 times fiscal 2015 adjusted earnings. Like Wal-Mart, Microsoft is far from a clear bargain. But the company is going through a transition as it shifts its business to the cloud, and that's certainly hurting earnings in the short run.

No one investing in Amazon today is doing so because the valuation looks reasonable. It's all about growth, and Amazon has been happy to deliver on that front. But for investors who want to buy shares of companies that generate real profits, and that return some of those profits to shareholders, Wal-Mart and Microsoft are far better options than Amazon.