Amazon shares rose to a record high Monday after the tech giant said it struck a $38 billion cloud computing deal with OpenAI.