GettyImages-538700536
Jeff Bezos, (right), CEO of Amazon, is presented with the 2016 USIBC Global Leadership Award by Indian Prime Minister Narendra Modi during the 41st Annual Leadership Summit at the Mellen Auditorium, in Washington, DC, June 7, 2016. Mark Wilson/Getty Images

After struggling for market share in China — the world’s most populous country and the second-largest economy — e-commerce giant Amazon Inc. is trying to make sure it fares better in India — currently the world’s second-most populous country, projected by the United Nations to overtake China by 2022, and the ninth-largest economy in 2014, according to the World Bank.

Having invested $2 billion in India in the first tranche in 2014, Amazon CEO Jeff Bezos announced Tuesday that the company would invest another $3 billion in the South Asian nation. Bezos was speaking in Washington, D.C., at a meeting of U.S. business leaders with visiting Indian Prime Minister Narendra Modi.

Modi, who met U.S. President Barack Obama earlier in the day, has been trying to push for increased foreign investments in India and has portrayed a more business-friendly image of the country earlier viewed as a difficult place for doing business.

Bezos reportedly said at the meeting that India was the company’s fastest growing market. He added that Amazon would open a Web Services Cloud Region later this year in India. The company’s software and development center in Hyderabad in south India would soon be its largest outside the United States, he said.

“We have already created some 45,000 jobs in India and continue to see huge potential in the Indian economy. Our Amazon.in team is surpassing even our most ambitious planned milestones,” Bezos said.

Amazon began operations in India in June 2013, going up against local entrenched rivals, Flipkart and Snapdeal. While it is now neck and neck with them, its rise has come at a price. The $2 billion it invested in July 2014 had run out almost entirely by April this year, i.e., in less than two years.

The company has not said how long it will take to spend the newly announced $3 billion in India, but a substantial portion of it will likely go toward offering discounts for products sold on its marketplace platform and adapting further to the local market. It was the lack of customization that cost it dear in China, where it lost out to Alibaba Group, which is also an investor in Snapdeal.

Both Flipkart and Snapdeal — valued at about $15 billion and $5 billion, respectively, according to data from the Wall Street Journal — are struggling to attract investors and raise fresh funds at their preferred valuations, according to reports in Indian media. Indian e-commerce players have attracted buyers — they bought about $16 billion worth of goods online in 2015, compared with $6.3 billion in 2014, according to Morgan Stanley estimates — through steep discounts, spending millions of dollars every month.

Recent reports in Indian media have also pointed out that some e-commerce companies, including Flipkart, have deferred the joining dates of campus recruits and in some cases, even withdrawn job offers, owing to financial pressures.

“The added investment reflects the success to-date of Amazon in India, as well as a bright outlook for the e-commerce market in the region. It’s really down to a two or maybe three-horse race, and Amazon clearly would like to be the winner,” Colin Sebastian, an analyst at Robert W. Baird & Co., told Bloomberg.