Amazon.com reported first-quarter revenue and profit that topped analysts’ estimates, driven by sustained growth in online retail sales and its profitable cloud business, sending its shares up more than 4% in extended trading on Thursday.

The world’s biggest online retailer said net income rose to $724 million, or $1.48 per share, from $513 million, or $1.07 per share, a year earlier. This marks the eighth straight quarter Amazon has posted a net profit.

Analysts on average had expected a…