Diwali is the time when annual bonuses are paid in India, and families do their heaviest shopping. The festival extends over several days, starting Oct. 17 this year.

“Amazon and Flipkart are more evenly matched today than ever before and it’s a lot tougher to predict who’ll be the winner in this year’s peak selling season," said Mrigank Gutgutia, engagement manager at researcher RedSeer Consulting Pvt. “With the war chests they have, both are building up warehouses and logistics infrastructure.”

Within miles of the new Hyderabad storage hub, is one of Amazon’s largest global customer service centers as well as one of its biggest software development facilities in the world. All of these are hidden from public view - except on rare occasions like this warehouse visit. They are all testimony to Chief Executive Officer Jeff Bezos’s aggressive Indian expansion that is backed by a $5 billion budgetary allocation.

Amazon’s 41 warehouses in India are vital in a country where the largest online retailers are marketplaces without any inventory of their own in accordance with foreign investment rules for e-commerce. Their locations are crucial because the nation’s logistics networks can be unreliable. They have to be close to sellers and with easy access to a density of buyers.

Those in the real-estate trade alert rivals to each other’s warehouse searches, and competition is intense. Alibaba-backed Paytm E-commerce Pvt. is the newest competitor in the fray and just beginning to build capacity.

“On-ground superiority can give an edge to the players, bringing down supply chain costs, optimizing shipping and providing premium customers the fastest delivery,” said Gutgutia, the analyst.

Walk beyond the “Work Hard.Have Fun.Make History” sign inside the non-descript Amazon warehouse codenamed HYD8, and the floor has a traditional Indian ‘rangoli’ drawing of the company’s fulfillment mascot, Peccy. Pass the wall of metal detectors, and there’s a 1.6 kilometer long network of conveyor belts snaking through the building’s innards. The goal is to fulfill orders at the fastest time with the lowest possible cost, but there’s not a single robot in sight.

“In India, we’ve adopted a hybrid model, a blend of people and conveyor,” said Akhil Saxena, vice president, India Customer Fulfilment. Full-on automation and drone deliveries are as yet distant specks on India’s e-commerce horizon. Fixed costs are high in the country while labor costs are low, the inverse of the West. So a vast number of workers toil in comparatively smaller warehouses.

The nation’s patchy logistics network and the vendors’ poor digital grasp mean that most operating on Amazon’s marketplace prefer to drop their products to such depots, have their names appear in the ‘sold by’ box beside the product listings, and let the company worry about packing and deliveries.

There are about a dozen steps before items are shipped to the country’s far-flung corners. Products ranging from shiny idols of India’s elephant-headed god, Ganesha, to colorful smartphone skins and small hacksaws, are each quality checked, barcoded and laser scanned for exact dimensions. Finally, a computer algorithm helps ‘slot’ and optimize storage, calculating charges for sellers who pay for warehouse space - down to each cubic foot.