Amazon got more heat from the White House this week, and former Twitter CEO Dick Costolo said it's sending shivers down the spines of CEOs across the technology sector.

"Your hackles are certainly up about things like the word 'monopoly,' and worrying that general political views could be used against you to artificially constrain your business," Costolo told CNBC's "Squawk Alley" on Tuesday.

Trump unleashed tweets this week aimed at The Washington Post's reporting on the conflict in Syria. The Post reported that the Trump administration is working in cooperation with Russia, a strategy that some see as "short-sighted," according to the Post.

Costolo called the tweets "disconcerting and extreme."

Trump tweets: The Amazon Washington Post fabricated the facts on my ending massive, dangerous, and wasteful payments to Syrian rebels fighting Assad.....

Trump tweets: So many stories about me in the @washingtonpost are Fake News. They are as bad as ratings challenged @CNN. Lobbyist for Amazon and taxes?

Trump tweets: Is Fake News Washington Post being used as a lobbyist weapon against Congress to keep Politicians from looking into Amazon no-tax monopoly?

While The Washington Post is not affiliated with Amazon in a business capacity, it is owned by Amazon CEO Jeff Bezos. Amazon does collect sales taxes nationwide as of this year, but the company's growing influence in retail, cloud, smart-home devices, content creation and now groceries has raised eyebrows.

"Probably the worst way to attack [Bezos] is to refer to the stock in which most of his wealth is held as the 'no-tax monopoly,'" Costolo said. "On a serious note, the president probably used the word monopoly intentionally there. Amazon just acquired Whole Foods."

With inflammatory remarks frequently gracing the president's Twitter feed, eventually business leaders may brush off such comments, Costolo said. Indeed, Amazon shares were down less than half a percent midday Tuesday.

Still, Amazon, alongside other technology companies, has spent record-high amounts lobbying during the last three months.

"People out here — and I'm probably understating this — are concerned about the kind of discourse we're hearing about technology and business in these seemingly off-handed remarks," Costolo said.

— CNBC's Ylan Mui contributed to this report.