What happened

Shares of Amazon (AMZN -1.64%) were climbing last month after the tech giant posted strong first-quarter earnings at the end of the month and benefited from a broader rally in early April.

According to data from S&P Global Market Intelligence, Amazon shares finished the month up 12%. As you can see from the chart below, the stock gained steadily over much of April.

AMZN Chart

AMZN data by YCharts

So what

Amazon shares surged early in the month, riding higher on news about Biden's $2.3 trillion infrastructure plan, a strong March jobs report, and the defeat of a unionization drive at an Alabama warehouse. (Votes against unionizing outnumbered votes for by more than 2-for-1.)

An Amazon Air jet in a hangar.

Image source: Amazon.

As the leader in e-commerce and cloud infrastructure, Amazon is in a great position to benefit from the passage of an infrastructure bill that would improve roads, helping make deliveries faster, and expand internet access. As a retailer, the company should also benefit from the economic reopening, which is already driving consumer spending higher.

Towards the end of the month, the stock gained in tandem with blowout results from other tech stocks , pointing to strong growth at the company in digital advertising and cloud computing.

Amazon itself posted smashing results in its Q1 report with revenue up 44% to $108.5 billion, outpacing expectations at $104.6 billion, and saw earnings per share more than triple to $15.79, easily beating estimates at $9.54. The company's profit margins continue to expand rapidly due to growth in businesses like advertising, third-party seller services, and cloud computing.

Now what

Looking ahead, the company expects another round of strong growth in the second quarter, calling for $110 billion to $116 billion, or 27% revenue growth at the midpoint. Though Amazon may face some headwinds from the reopening as shopping habits trend away from e-commerce, the company now has more than 200 million Prime members. Over the last year, it has invested more than $45 billion back into its business in areas like logistics, which will only reinforce its competitive advantage. 

Expect its profit margins to continue to expand as its high-margin businesses keep growing.