They can be had for pretty cheap, maybe $60-150. Some kinds just slip between the plug on the back of the bulb, if there's room in the headlight bucket. There's usually a wire for a switch or sunlight sensor to turn it off at night. Fairly simple to hook up.
I could not find the unit I have installed, but this one is very similar: Amazon Link. Actually, the unit I have, cost me around $30 + S/H, so this is a better price, for very similar performance.
It does require wire splicing, and it will handle up to a single15 Watt bulb, so check your bike, carefully. If you have dual bulbs in the rear, you will need a separate unit for each bulb. The 1157 bulbs are 10 W/27 W filaments (27 Watts for the Brake light filament), so unless you switch to LED's, this unit won't will burn out. If you install LED bulbs, then this unit will work just fine. The LED replacements will burn less than 3 Watts, typically.
This unit flashes through its pattern, then it stays on steady. Some units have a non-stop, repeating pattern of flashes, for as long as you hold the brake on... These types are, IMO, extremely annoying, and I recommend avoiding them. Cheers!