You could also use net worth to quantify how much "weight" Amazon has available rather than what it is actively exerting in influence, in which case it would be around the 35th largest nation considering its 656B valuation. Thats roughly as much as Finland is worth. I didn't use that statistic because I think there is a much wider differentiation between a nations wealth and a companies market cap than USD revenue vs USD nominal gdp.
https://www.forbes.com/sites/timworstall/2011/06/28/gdp-for-...
GDP to market cap is worse. The net worth of a country is not it's GDP. The total wealth of the US is about ~90 trillion.
https://en.wikipedia.org/wiki/Wealth_inequality_in_the_Unite...
The estimates for total wealth, however, are really fraught and fluctuate, as does market cap in other currencies.
It could even be for a loss. If you did 1Bn in revenue but paid 2Bn for the goods you're selling it's not really a win.
GDP is more like the value add of a country. Profit is a better comparison. However, profit is tricky as companies often use it to grow rather than pay out profit.
Amazon's profit was 4B. Even saying, reasonably that they used 20Bn than they made in profit and diverted to growth it makes them much, much smaller compared to a country.