Another things to bear in mind for RPi 4B, this is regarding the 3 RAM variant board. Because the outlook are the same, so some reseller asked how to differentiate it. here are the answer:

if the board can boot up you can check the revision code by entering cat /proc/cpuinfo

The revision codes are unique to a memory density and you can get the latest list of revision codes here:


https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md 



If the board will not power up at all it gets a little more difficult.


You can follow the following steps:

1) Check the memory device:

Samsung K4F8E304HB-MGCJ000 = 1GB (8Gb)

Micron MT53D512M32D2DS-053 WT:D = 2GB (16Gb)

Micron MT53D1024M32D4DT-053 WT:D = 4GB (32Gb)


Be warned, these numbers are very difficult to read, even under a magnifying glass (and sometimes they could just have a batch number on them)


2) If everything fails then it is possible to read the 2D Barcode on the bottom of the board and get to the model from there - but please note, this will need to be decoded at the factory (from a image of the barcode), so can only be done in exceptional circumstances - there is no capability to cross check every board you have returned (hopefully not many!), this can only be done in exceptional circumstances