Amazon has been on a spending spree, preparing for the future as revenue growth slows