It was very quick when I rode that route last March – it only took about 5 minutes to get through passport check and the security/agriculture X-ray. You get your documents checked and customs form stamped at the Amtrak station in Vancouver, and then the train stops at the border and customs agents come on board to check your passport (or NEXUS/passport card) and collect the customs forms.
The Cascades rider's guide (
http://www.amtrakcascades.com/RidersGuide.htm) recommends the same 30-minutes-before-departure as they recommend for domestic trains.