We describe a technique for the generation of a solitary attosecond X-ray pulse in a free electron laser (FEL), via a process of self-amplified spontaneous emission. In this method, electrons experience an energy modulation upon interacting with laser pulses having a duration of a few cycles within single-period wiggler magnets. Two consecutive modulation sections, followed by compression in a dispersive section, are used to obtain a single, sub-femtosecond spike in the electron peak current. This region of the electron beam experiences an enhanced growth rate for FEL amplification. After propagation through a long undulator, this current spike emits a ~;250 attosecond X-ray pulse whose intensity dominates the X-ray emission from the rest of the electron bunch.