Just as entire communities revolved around the automobile, steel and other industries in the last century, many places in America now depend almost entirely on e-commerce giants like Amazon.

Why it matters: E-commerce has created the new factory town. "The pendulum is swinging back, bringing jobs to places that had been left behind" as manufacturing plants closed down, says Michael Mandel, chief economic strategist at the Democratic-leaning Progressive Policy Institute. "I see e-commerce as a really good corrective to the concentration of jobs in cities and coasts."

Here's where it's happening:

Campbellsville, Kentucky has about 26,000 residents — and 20% of its working population works in e-commerce. That's largely due to two Amazon fulfillment centers.

has about 26,000 residents — and 20% of its working population works in e-commerce. That's largely due to two Amazon fulfillment centers. Ottawa, Kansas, also a town of about 26,000 people, has 15% of its working population in e-commerce jobs thanks to a pair of big Walmart and American Eagle distribution centers in town.

also a town of about 26,000 people, has 15% of its working population in e-commerce jobs thanks to a pair of big Walmart and American Eagle distribution centers in town. Mount Vernon, Illinois, which has long been home to a Walgreens distribution center, has 9.5% of its working population in warehousing jobs.

which has long been home to a Walgreens distribution center, has 9.5% of its working population in warehousing jobs. And the list goes on with small towns from Texas to Florida to Pennsylvania.

The other side: The scores of warehousing jobs supporting many rural American towns are also among the most vulnerable to automation. As e-commerce and retail companies continue to invest technologies to replace people in warehouses, thousands of workers in some of the country's poorest towns could eventually be out of work.

"Automation is here ... [and] there is absolutely a portion of this workforce that at some point over time is not going to be needed," says David Egan, global head of industrial & logistics research at CBRE, an investment and market research firm.

The big picture: While several small towns have high concentrations of warehouse workers, the e-commerce jobs boom seems to be mainly concentrated in big, wealthy cities, says Joe Kane of the Brookings Institution.

The biggest jumps in absolute numbers of jobs since 2010 have occurred in New York City, Seattle, Los Angeles and Dallas — partly due to Amazon's hiring spree at its corporate hubs and partly due to the rise of last-mile distribution centers, which are smaller warehouses located closer to cities.

Don't expect the big rural warehouses to disappear anytime soon, Egan says. "Those are indispensable ... that's where a lot of the inventory sits, that's where fulfillment begins."