We demonstrate an actively gain-flattened erbium-doped fiber amplifier (EDFA) using an all-fiber gain-flattening filter with electronically controllable spectral profiles. A good gain flatness (<0.7 dB) over a broad wavelength span (>35 nm) is achieved for a wide range of operational gain levels as well as input signal and pump powers.