E-commerce giant Amazon Inc. will become a top sponsor of this year’s Boston Marathon, the nonprofit behind the race said.