The e-commerce giant reported its third consecutive best-ever quarterly profit, thanks to Prime and its AWS cloud service.