We demonstrate an erbium-doped fiber amplifier (EDFA) that has a flat-gain spectrum over an 18-nm band and a constant per-channel output power regardless of the input powers and the number of channels. The gain flatness and the constant output are obtained by changing the laser diode pump power and the attenuation of the voltage-controlled attenuator (VCA) dynamically. The response times of pump control circuit and attenuator control circuit are 650 us and 9 ms, respectively. The power excursion of surviving channel in an EDFA with fast control circuit is similar to 1% of that without fast control circuit when channels are added or dropped.