Amazon Posts First Quarterly Loss Since 2015 as Prices, Rivian Stake Weigh on Outcomes