NEW YORK (TheStreet) -- Sometimes piggy-backing on hot stocks can be almost as good as owning the stocks themselves.

Exchange-traded funds that have large holdings in Amazon (AMZN) - Get Report and Facebook (FB) - Get Report have been rallying over the past month as Amazon has surged 10% and Facebook 11%.

Not surprisingly, more investors are putting money in these ETFs.

First Trust DJ Internet Index Fund (FDN) - Get Report, the largest dedicated Internet ETF, is up 3.5% over the past month and touched a record high on Tuesday. The $3 billion fund, which has almost 20% of its weight-adjusted holdings in Facebook and Amazon, has seen $119.4 million of inflows since June 15. The two stocks are the ETFs biggest holdings, according to issuer data.

Of course, the gains investors will get from the ETFs won't match those of the stocks themselves. But there are advantages to investing this way. For one thing, you diversify your risk. The upside may be limited, but so is the potential loss if the individual stocks suddenly reverse course.

ETFs also make it easier to invest in high-priced stocks. Amazon, for instance, is trading at over $460 a share. First Trust's top 10 holdings feature six stocks with triple- or quadruple-digit price tags.

PowerShares QQQ Trust (QQQ) - Get Report, an ETF that tracks the top 100 stocks in the Nasdaq Composite Index, is another fund that has big holdings in Amazon and Facebook. The rallies by both stocks have helped QQQ rise 1% over the past month despite the recent slide by Apple (AAPL) - Get Report, which is the fund's biggest holding with 14.1% of the weighted index. Amazon and Facebook have a combined weight of about 8.1%, and they are the fund's third and fourth-biggest holdings. Investors have poured about $388 million into QQQ since June 15.

Some hyper-focused ETFs are also getting an Amazon/Facebook lift. For instance, First Trust Exchange-Traded Fund II (SKYY) - Get Report has risen 5.1% year to date. The fund focuses on stocks of companies in the cloud-computing business.

Cloud computing may not be the first thing on investors' minds when it comes to Amazon and Facebook, but the First Trust index fund can include companies that support the cloud industry or are indirectly related to it, according to First Trust.

Facebook and Amazon are SKYY's largest and third-largest holdings, combining for 7.7% of the ETF's weighting.

SKYY is also one of a small number of ETFs that has Netflix (NFLX) - Get Report as one of its top five holdings. Netflix is almost 3.9% of the fund's weight, making the stock the ETF's second-largest holding. Investors have allocated $6.2 million to the lone cloud computing ETF over the past month.

The $471.7 million fund holds 37 stocks and has an annual expense ratio of 0.6%.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks or funds mentioned.