Amazon has reached a new agreement with the U.S. Postal Service, providing a lifeline to the beleaguered government agency.