Amazon (AMZN -1.27%) stock gained ground in Wednesday's trading. The company's share price ended the daily session up 2.3%, according to data from S&P Global Market Intelligence.

Amazon published its first-quarter results after the market closed yesterday, reporting sales and earnings for the period that beat the average analyst estimate. The e-commerce and cloud-computing giant reported earnings per share of $0.98 on sales of $143.3 billion. For comparison, the average analyst estimate had called for the business to post per-share earnings of $0.83 on revenue of $142.55 billion.

Amazon's growth drivers look strong

Amazon's revenue climbed 12.5% year over year in the first quarter. The company's North America segment saw an increase of 12% year over year to reach $86.3 billion. Meanwhile, sales for Amazon Web Services (AWS) rose 25% year over year to $25 billion, and international segment sales increased 10% year over year to hit $31.9 billion.

Following the strong Q1 sales and earnings beats, Amazon stock rose as much as 5.8% in the daily trading session. But the tech giant's share price lost some ground as investors weighed the company's forward guidance.

Amazon stock still looks like a long-term winner

For the second quarter, Amazon is guiding for sales to come in between $144 billion and $149 billion, suggesting growth of roughly 9% at the midpoint of the target. However, the guidance fell short of the average Wall Street analyst estimate's call for revenue of $150.09 billion in the period.

On the other hand, Amazon does anticipate a substantial improvement for Q2 operating income. The company is guiding for operating income to come in between $10 billion and $14 billion, improving dramatically from the $7.7 billion in operating income that it recorded in last year's quarter.

With artificial intelligence powering strong demand for AWS and opening the doors for dramatic efficiency improvements for the company's e-commerce business, Amazon stock looks like a smart buy on the heels of its first-quarter report. Even if second-quarter sales guidance fell short of Wall Street's target, the tech leader's long-term prospects remain very promising.