A high-purity GaAs sensor of 110 μm thickness has been bump bonded to a Medipix2 readout chip. The room temperature spectroscopic response of this device to fluorescence photons in the energy range from 8 to 28 keV is presented and compared to the response of a 300 μm thick Si sensor, also bonded to a Medipix2 chip. The measured photopeak responses are used to calibrate both detectors. The depth of depletion of the GaAs sensor is estimated to be 50 μm at 140 V sensor bias voltage from measurements made using the 8 keV Kα line of a Cu target X-ray tube.