After dropping for much of the past year, e-commerce sales are back on the upswing. People are returning to more normal spending patterns following soaring demand during the pandemic and a sharp growth hangover that affected most of the 2022 fiscal year.

Investors shouldn't buy e-commerce stocks indiscriminately, though, as some businesses are better positioned than others to capitalize on the industry's expansion. There are many high-growth stocks that will inject too much risk into your portfolio, too.

With that in mind, let's look at a few attractive options for investors in this space.

1. Shopify

There have been encouraging hints of a rebound in Shopify's (SHOP -0.91%) last few earnings reports, but its early November update solidified much of that optimism for investors. The selling platform revealed two trends that point to excellent earnings growth ahead. First, sales growth was robust at 25% of sales in the period that ran through late September.

This boost was powered by a rebounding e-commerce demand but also by increased sales of its subscription services. Shopify has been adding more services to its portfolio, including payment processing, and that diversity is attracting more business.

Meanwhile, the company's focus on profitability is paying off in a big way. The sale of its capital-intensive logistics business helped propel gross profit margin to 53% of sales from 49% of sales a year ago. Management is projecting a further 3 percentage-point improvement in the fiscal fourth-quarter period, as well. Look for these financial and operating wins to support further positive returns for shareholders from here.

2. Amazon

Amazon (AMZN -0.65%) is already a $1.5 trillion business, but let me make the case for much more growth ahead. E-commerce sales have expanded at a phenomenal pace since 2000, rising to 15% of overall retail sales in 2023 from less than 1%. Amazon continues to be a major beneficiary of that shift.

The e-commerce segment of its business returned to solid growth in the first three quarters of 2023, partly thanks to the company's continuous efforts at boosting customer service. Delivery times continue to improve across the country, and shoppers are thrilled to see many more products available for same-day or faster fulfillment.

An Amazon investment also carries excellent exposure to the booming market for cloud services, which promises to boost cash flow and earnings over time. Investors could see evidence of this trend at work last quarter when operating cash flow jumped 81% to $72 billion. That spike will mean more flexibility for Amazon to invest in growth initiatives and more cash available for direct shareholder returns in the years to come.

3. Home Depot

Home Depot (HD 0.47%) may be best known for its sprawling retail locations, but the home improvement giant is also a huge force in the e-commerce space. A significant proportion of its over $150 billion of annual sales begins online, after all, and management says most of those online orders translate into customer traffic as well.

Home Depot is doing a great job at making more of its products available for delivery, including bulk products and heavy merchandise. Those growth investments continue despite a slowdown in the wider market that's likely to push sales down by about 3% in 2023.

The good news is that the stock has declined in recent months as Wall Street frets over short-term challenges in the housing market tied to rising mortgage rates. Home Depot has thrived through many previous downturns, though, and this industry leader is likely to emerge from this one as a stronger business as well. Income investors will be especially interested in this stock, which today yields nearly 3%.