Snap to buy $1 billion in cloud services from Amazon following rocky IPO