Amazon sales soared 40% in the three months ending June, while Apple saw a surge in purchases of its iPhones and other hardware.
At Facebook, the number of people on its platforms, which include WhatsApp and Instagram, jumped by 15%.
The gains come as the firms face scrutiny over their size and power.
At a hearing in Washington on Wednesday, lawmakers grilled the companies about whether they were abusing their dominance to quash rivals, noting the sharp contrast between their fortunes and many other firms.