Amazon had delivery problems, and it solved them by building the fourth largest delivery service in the U.S.