The Seattle retailer posted $2.5 billion in net income, boosted by growth in its cloud-computing and advertising units.