The sustainability of Amazon-style shipping is pretty complicated. If you buy items on Amazon, yes, they must be shipped, but you can bet that Amazon will find the cheapest (and likely relatively low-energy) way of shipping it to you.
Meanwhile, you don't have to have as many physical retail stores, which consume tremendous amounts of electricity, and contribute to the suburban sprawl that causes "car culture."
It's definitely complicated. I was thinking of a few different scenarios and in some cases it's not clear that local distribution is always a better route. For example if your local store gets a shipment of 100 items and only sells 10 what happens to the other 90? Do they get shipped back? Thrown away? Who knows... If the UPS truck happens to be down the street and needs to go 1 mile out of its way to make a delivery to me that's better than my own 10 mile trip. Even with your example of less physical stores we'd have to consider that means less jobs, less revenue for the town in the form of property taxes when the business closes, less sales tax for the state -- apparently Amazon only charges sales tax in 5 states.
Meanwhile, you don't have to have as many physical retail stores, which consume tremendous amounts of electricity, and contribute to the suburban sprawl that causes "car culture."