Net income is hard to judge — yes it’s down but not only is Amazon famous for reinvesting all profits and claiming $0 of net earnings, but they’ve also been writing off a lot of one time charges for severances related to these layoffs.
You can see this reflected in the revenue of other advertising companies as well such as google and meta.
But to be clear the economy does not currently "suck in general" hence the confusion over blaming "the current macroeconomic environment".
These companies (including advertisers) are trying to get out in front of an economic downturn that hasn't yet materialized. And if it does materialize, all these companies will have a hand in causing it due to their reduced spending and layoffs which we know has potential to cause an economic slowdown.
To be clear, what you say has little effect on reality. The decreased discretionary spending, housing market approaching a complete freeze, layoffs (those not being publicized in the news), inflation impacting every vertical, and the various shuttering businesses (survived covid, but died anyway), are what makes it "suck". This is not quantitative, but it is the sentiment.
The gold rush is now over, for a while at least, so Amazon is probably seeing a lot of their big AWS customers cutting back, or in some cases disappearing. Essentially, AWS is in the same position as SVBank. If your money comes from lots of tech startups that don't want to have their own infrastructure, and didn't used to need to worry about cutting costs, but now they do, then you can see big "outflows" (except unlike SVB it's more decreasing revenue).
AWS grew at 20% in Q4 2022. Grew less than forecasted but still not "disappearing".
https://www.cnbc.com/2023/02/02/amazon-aws-earnings-q4-2022....