Amazon (AMZN) - Get Report must continue to invest to stay ahead of competitors for both its online business and its cloud services business, according to Charlie O'Shea, an analyst at Moody's.

Amazon's earnings missed expectations, which weighed on its stock Friday. O'Shea says Amazon is a hard company to benchmark on a quarterly basis because it is investing for the future. But he added that Amazon's competitors are upping their investments, too.

O'Shea pointed out that when it comes to cloud services, both Microsoft (MSFT) - Get Report and Alphabet (GOOGL) - Get Report , a holding in Jim Cramer's Action Alerts PLUS portfolio, are better capitalized.

Meantime, in terms of its online retail sales business, Amazon is battling with the brick-and-mortar retailers to maintain market share, including companies such as Walmart (WMT) - Get Report and Target (TGT) - Get Report . O'Shea added that this will be a very competitive holiday season for retailers overall, and Amazon may be forced to become more promotional in order to keep fighting against these retailers.

But O'Shea is bullish on Amazon Prime, saying that "it's a big deal." O'Shea said content is key for Prime, and Amazon will continue to invest heavily in that service. O'Shea thinks Amazon could surprise on the upside in terms of its revenue growth target, projecting growth of about 20% in the fourth quarter.