The cloud market has had its share of attention in recent years, with the COVID-19 pandemic bolstering the sector as thousands of companies moved to hybrid working styles. As a result, cloud giants enjoyed several quarters of winning over investors with double-digit revenue growth from their cloud platforms. Last year's economic headwinds have since slowed cloud growth for many companies as rising inflation forced businesses to trim cloud budgets.

Even with this volatility, the cloud industry continues to garner a solid long-term outlook. As inflation eases and artificial intelligence (AI) advances, both trends offer cloud companies a fresh boost. Data from Grand View Research shows the cloud market hit a value of $484 billion in 2022 and is projected to continue expanding at a compound annual growth rate of 14% through 2030.

With considerable growth ahead, now is an excellent time to consider adding a cloud stock to your portfolio. Here are three of the best cloud stocks to buy in June. 

1. Microsoft: Massive potential in its cloud platform Azure

Microsoft (MSFT 2.48%) is an easy cloud stock to recommend thanks to its platform Azure, which holds the second-largest market share in the industry at 23%, only behind Amazon Web Services' (AWS) 32%. However, recent moves suggest the Windows company could get a leg up on the competition over the long term with the help of AI.

In 2019, Microsoft seemingly made a prescient move by investing $1 billion in ChatGPT developer OpenAI (it later invested an additional $10 billion). The launch of ChatGPT last November and its early success kicked off an AI race among cloud companies, with Microsoft gaining a massive advantage. As tech giants like Amazon rush to develop and offer their own AI cloud services, Microsoft was able to use OpenAI's technologies to bring AI upgrades to Azure and many of its other products. As a result, Microsoft sets itself up to become the go-to for businesses and consumers looking for online AI tools, including those related to cloud computing.

Azure revenue (on a constant currency basis) rose 31% year over year in fiscal 2023's third quarter (ended March 31). That's nearly double AWS's year-over-year growth rate of 15.8% in the same period. Microsoft's cloud business is developing rapidly, making its stock a screaming buy this month.

2. Advanced Micro Devices: A leader in cloud chips

While Microsoft excels in the software side of cloud computing, Advanced Micro Devices (AMD 2.73%) is a great way to invest in the hardware that makes the industry possible. 

The company's chips power data centers worldwide that host multiple cloud platforms. AMD's clients include Azure, Alphabet's (GOOG 9.98%) (GOOGL 10.32%) Google Cloud, and Oracle, which all use the company's hardware to power their services. As the sector develops, AMD is well positioned to profit significantly from a rise in chip demand, and its data center segment already reflects this. Revenue in the segment rose 64% year over year in fiscal 2022 and hit $6 billion.

Moreover, AMD is getting support from Microsoft to expand its AI chip offerings through financial and engineering resources (per Bloomberg). The collaboration is a big green flag for AMD's future as AI becomes a larger focus for cloud companies.

Regarding its stock, AMD's forward price/earnings-to-growth (PEG) ratio of 0.2 is a compelling metric. The figure suggests projected growth is not priced into its shares, making June a great time to consider investing in AMD. 

3. Alphabet: A bargain buy

AMZN PE Ratio (Forward) Chart

Data by YCharts

Alphabet may not have the cloud dominance of Microsoft, but its 10% share in the industry is nothing to sniff at. The company holds the third-largest market share in cloud computing. Meanwhile, its less-developed cloud business makes it a bargain buy. The table above shows that Alphabet's forward P/E ratio marks its stock as the cheapest among the three biggest cloud companies. 

Additionally, Alphabet's cloud business seems to be headed in the right direction after hitting profitability for the first time in its latest quarter. The first quarter of 2023 saw Google Cloud hit $7 billion in revenue and $191 million in operating income after three years of losses since the company first started reporting income for the business segment.

Alphabet has also pivoted its business to AI development this year, recently launching its competitor to ChatGPT, called Bard. CEO Sundar Pichai emphasized in April that this is only the beginning, with plans for the company to expand further by offering AI programming and software development tools. 

After years of criticism that Alphabet lacked direction, it now seems highly motivated to become a dominant part of the cloud and AI markets. With its shares trading at a significantly better value than the competition's, Alphabet's stock is worth considering this month.