We present a new experimental setup for performing X-ray Absorption Spectroscopy (XAS) in the soft X-ray range at ambient pressure. The ambient pressure XAS setup is fully compatible with the ultra high vacuum environment of a synchrotron radiation spectroscopy beamline end station by means of ultrathin Si3N4 membranes acting as windows for the X-ray beam and seal of the atmospheric sample environment. The XAS detection is performed in total electron yield (TEY) mode by probing the drain current from the sample with a picoammeter. The high signal/noise ratio achievable in the TEY mode, combined with a continuous scanning of the X-ray energies, makes it possible recording XAS spectra in a few seconds. The first results show the performance of this setup to record fast XAS spectra from sample surfaces exposed at atmospheric pressure, even in the case of highly insulating samples. The use of a permanent magnet inside the reaction cell enables the measurement of X-ray magnetic circular dichroism at ambient pressure.