Amazon's journey from an online bookseller to an e-commerce and cloud computing giant offers key lessons for investors.