Amazon.com Inc. reported quarterly profit that topped estimates as cost cuts and surprisingly strong sales in the cloud-computing division helped the e-commerce giant weather an uncertain economy. The shares were little changed in extended trading, giving back earlier gains of as much as 12%.