Amazon becomes most valuable US firm amid market turmoil