Nearly $240bn has been wiped off the value of Amazon in a sign that investors have become anxious at the eye watering sums being spent by Wall Street on AI.