We developed a vacuum-compatible pulse selector for a free-electron laser. A rotating cylinder with eight apertures in a vacuum is driven by a closed-loop stepping motor system through a magnetically coupled rotary feedthrough. A field programmable gate array is used to synchronize the cylinder rotation with a trigger signal of the accelerator at a maximum repetition rate of 60 Hz. We achieved to select specific pulses from a continuous pulse train of the SPring-8 Compact SASE Source.