Amazon and PillPack today announced that they have entered into a definitive merger agreement under which Amazon will acquire PillPack.

PillPack is a pharmacy designed to provide the best possible customer experience in the U.S. for people who take multiple daily prescriptions. PillPack delivers medications in pre-sorted dose packaging, coordinates refills and renewals, and makes sure shipments are sent on time.

Amazon has been debating internally whether to enter the pharmacy market for years, according to people familiar with its thinking. Amazon typically builds most businesses itself from scratch, but when it does decide to make an acquisition, it is usually because the company thinks it will be a faster road to entering that market or to acquire needed expertise. In PillPack's case, it is likely a combination of both.

Completion of this transaction is subject to regulatory approvals and other customary closing conditions. The parties expect to close the transaction during the second half of 2018.