Amazon.com Inc. is facing higher shipping costs, touching off a scramble to protect margins. It isn’t alone.

Shipping and storage indicators—from rail freight to air transportation—have jumped economy-wide in recent months, reflecting both solid demand and higher costs for diesel and other fuels.

Producer Price Index data—which tracks costs charged at a wholesale level—show that package delivery excluding the U.S. Postal Service is accelerating particularly quickly, climbing 6.8 percent in the year through February. Those gains have been happening for a while: Year-on-year inflation for the index averaged 6.6 percent over the past 12 months. In February 2017, that 12-month moving average was much slower at 2.7 percent.

Amazon Is Said to Squeeze Suppliers to Curb Losses in Price Wars

Amazon has company as it sizes up higher transportation expenses. Hershey Co. has said that higher freight costs are expected to be a 2018 headwind, chicken company Sanderson Farms Inc. and Hormel Foods Corp. have said shipping expenses are rising and will be hurdle this year, and Tyson Foods, Inc., Kellogg Co. and McCormick & Co. have also noted an acceleration.