Basically, the amyloid protein (a waxy, protein normally produced in response to inflammation) is deposited within the kidney (or other organs) and destoys the kidney cells which can not be reproduced, thus eventually kidney failure.
The inflammation in Shar Pei is FSF - Familiar Shar Pei Fever, which are fevers of unexplained origin. But, just because a pei has FSF does not mean it will have/die of amyloidosis.
There is no way of testing for either of these, that's why it's important to ask the breeder if either of them have been reported in their lines.