Amazon was falling on Friday after making a huge commitment to spending on artificial intelligence. Analysts are backing the move to pay off.