Twitter (TWTR) may be a leading social media platform, and this year, its stock has well outperformed the market. But despite both its notoriety and its recent share-price gains, the company hasn't done a great job managing its business.

Peers including Facebook (META 0.57%) and Snap (SNAP 2.77%) are doing noticeably better than Twitter in terms of profit margins, which has led investors to ask what needs to be changed to close that gap. Their frustration has even attracted the attentions of activist investors that have pledged to help Twitter boost its profitability.

Recently, there have been signs that management is ready to make some of those changes. The latest was Twitter's announcement last week that it was expanding its relationship with Amazon (AMZN 3.20%). In its recent operational foray into the public cloud, it will use Amazon Web Services to improve the real-time experience for its users. This shift could both optimize Twitter's performance and save it some money on IT expenses.

A person using a smart phone with thought bubbles above the phone

Image Source: Getty Images.

Twitter selects AWS

Amazon Web Services (AWS) is one of the world's top cloud computing platforms, and has many features that Twitter thinks will be useful to it, among them analytics and application development. The two companies' multiyear agreement will allow Twitter to leverage AWS's ability to support millions of daily tweets and improve how people use the platform. 

In the past, the social media company has primarily depended on in-house servers. "Twitter's decision to rely on AWS infrastructure and services for its real-time workloads will help them instantly scale their global footprint up and down without ever compromising the experience for people," said Matt Garman, vice president of sales and marketing at AWS.

Twitter also believes this partnership will improve its own IT infrastructure. With its new seamless hybrid environment, Twitter will be able to capitalize on AWS's fault-tolerant infrastructure, which will allow it to keep serving its users even if there are partial failures in its systems.

Opportunity to improve margins

The gaps between Twitter's profit margins and those of its peers are significant and glaring. But what's causing them? Some believe Twitter has a spending problem.

TWTR Operating Margin (TTM) Chart

TWTR Operating Margin (TTM) data by YCharts

In 2019 alone, the company spent close to $682 million on research and development, and $913 million on sales and marketing. These would be large sums of money for most companies, but they are especially problematic for Twitter, which hasn't delivered much in the way of profits since it was launched.

But it may be under-earning its potential. Perhaps by outsourcing some of its IT spending through this AWS deal, the company could achieve better operating margins. At the very least, the recently announced deal may be a sign that Twitter is taking that goal more seriously.

Activist investors

CEO Jack Dorsey has been under fire this year from activist investor Elliott Management, which blames Twitter's issues on how it has been managed.

Twitter has likely always had the potential to improve its profitability like other internet companies, but with activist investors putting more pressure on it, it may be ready to try strategies it had previously shunned. This AWS partnership may be an early sign that Twitter is changing its ways.