Total sales rose at Amazon for the fourth quarter and for all of 2022, but the company’s bottom line declined, the company reported yesterday.

Sales for the year rose 9.3%, to $514 billion, but the company had a net loss of $2.7 billion compared to net income of $33 billion in 2021. For the fourth quarter, sales rose 8.6%, to $149.2 billion—better than analysts had expected—but earnings fell to $278 million, from $14.3 billion in the final quarter of 2021.

Amazon continued to derive most of its profits from its Amazon Web Services division (AWS). The AWS segment operating income for the full year was $22.8 billion, compared with operating income of $18.5 billion in 2021. Both the company’s North American and international divisions had operating losses in 2022.

Reporting on its other operating businesses, Amazon said worldwide online sales fell 2% in the fourth quarter, to $64.5 billion—the fourth time in five quarters sales in the business fell. Its third-party sellers business did much better, with a 20% sales increase, to $36.3 billion.

Commenting on results, CEO Andy Jassy called cutting costs is his top priority. Among the actions Amazon has taken to lower expenses is to eliminate 18,000 jobs worldwide. In late 2022, Amazon cut some jobs in its Books group, and in January, it eliminated positions at Comixology, as part of the company's strategy to reduce costs in its Stores group. (Jassy said he has been “encouraged” by the progress the company has made in cutting costs.)

Amazon gave a lukewarm forecast for 2023. “In the short term, we face an uncertain economy, but we remain quite optimistic about the long-term opportunities for Amazon,” Jassy said. In terms of numbers, Amazon said it expects net sales in the first quarter to grow between 4% and 8% compared with first quarter 2022. Operating income is expected to be between $0 and $4.0 billion, compared with $3.7 billion in first quarter 2022.