U.S. companies are increasingly paying up to retrain workers as new technologies transform the workplace and companies struggle to recruit talent in one of the hottest job markets in decades.

Amazon.com Inc. is the latest example of a large employer committing to help its workers gain new skills. The online retailer said Thursday it plans to spend $700 million over about six years to retrain a third of its U.S. workforce as automation, machine learning and other technology upends the way many of its employees do their jobs.

...