Their sales are “fulfilled by Amazon,” as the service is known, for a variable fee, in most cases roughly 15 percent of the price of each item, which Hasidic entrepreneurs say is still cheaper than the cost of renting a store or warehouse space combined with other overhead.

If Amazon is fulfilling orders, the business may effectively be running on Sabbath and Jewish holidays, though how that is carried out is the subject of vigorous debate. With a Talmudic twist of logic, some Hasidic entrepreneurs take on a non-Jew as a presumptive partner, attributing profits made on the Sabbath to that person.

One drawback to working with Amazon is the inability of Hasidic business owners to answer customer queries and complaints on holy days, which can lower customer ratings since Amazon rules require prompt replies.

With all the competition on Amazon, Hasidic Jews are learning to game the system and its algorithms.

Mrs. Bernstein, like many other Hasidic merchants, hires search engine optimization specialists to generate the key words that will get their businesses high on Amazon’s product lists and in Google searches.

Mr. Friedman is also organizing a business, advertising and marketing expo in Brooklyn in December to help Hasidic merchants expand their online sales by contracting with experienced copy writers, web designers, videographers and other professionals whose occupations the Talmudic Sages never even dreamed of.

“We’re not college students,” Mr. Friedman said, “but the yeshiva makes us smart enough to figure things out.”