We study the prospects for discriminating between the dark matter (DM) and pulsar origin of the PAMELA positron excess with the Alpha Magnetic Spectrometer AMS-02. We simulate the response of AMS-02 to positrons (and electrons) originating from DM annihilations, and determine the pulsar parameters (spin-down luminosity, distance and characteristic age) that produce a satisfactory fit to the mock AMS-02 data. It turns out that it is always possible to mimic a DM signal with pulsars. Although the fit in some cases requires values of spin-down luminosity and characteristic age different from those of known pulsars in the ATNF and Fermi-LAT catalogues, these catalogues are known to be incomplete, and therefore the pulsar interpretation can hardly be ruled out. We also show that if the positron excess is due to a single pulsar, it is always possible to find a DM candidate that provides a good fit to the mock AMS-02 data. The discrimination between the two scenarios will thus require a better knowledge of the underlying sources, or complementary data.