The stock surged 26 percent in early trading Thursday to close at a new all-time high of $130.90.
MongoDB posted a 71 percent year-over-year gain in quarterly revenue, bolstered by strong numbers in the company's Atlas segment.
Twice in recent months MongoDB shares have plunged on concerns about competition from Amazon. On Jan. 10, the stock tanked on news that Amazon was rolling out cloud-based software called DocumentDB to directly compete with MongoDB. And on Feb. 26, it plummeted after an analyst said that Lyft, one of MongoDB's big customers, "is in the process of a massive database migration" to another service.
"We believe periodic investor angst to moves by Amazon to compete with Mongo are, as they so often are when it comes to Amazon, overwrought," analysts for Canaccord Genuity wrote in a note to clients Wednesday night. "The simple fact is that Amazon is a self-service vendor and the customers that Mongo is helping require sales interaction and certainly finer grained governance than AMZN's stripped down version."
MongoDB's open source database services integrate with other cloud providers, like Amazon, and its own fully-managed cloud offering, Atlas, is ballooning. The segment was up 400 percent year over year and accounted for nearly a third of total revenue during the quarter.
"Clearly there's a massive secular shift of moving workloads from on-premise to the cloud," CEO Dev Ittycheria told CNBC's "Squawk Alley" Thursday. "Now our offering runs on Amazon, runs on Google — so they're beneficiaries of our growth."
With regard to Amazon, Ittycheria said, the companies both partner and compete.
"I mean who doesn't compete with Amazon today?" he said. "They actually helped the deployment of Atlas on their cloud, we work with them in the field, we've closed a lot of joint customers. And we feel very good about our positioning."
The company's Atlas segment picked up high-profile clients during the quarter including cosmetic retail giant Ulta Beauty, and it achieved an annual revenue run rate of $100 million for the first time.
As of close Thursday, shares of MongoDB were up more than 50 percent this year, and up more than 220 percent in the last 12 months.
—CNBC's Ari Levy contributed to this report.