My iPhone 4 developed a common and frustrating problem - the flash LED was stuck on, even when the phone powered off. After trying all remedies proposed online, I decided to replace the iPhone camera.
This is not an easy repair - I screwed it up multiple times and figured out what I'd done wrong either because I couldn't get the case to close, or because the new camera also had the LED on, or wouldn't take photos. Ultimately, I worked it out and have a perfectly functioning iPhone, but not without a few moments of flopsweat.
It's really hard to connect the cable from the phone to the socket. You will likely fail to seat it correctly at least once. I resorted to keeping the battery in place, disconnecting the connector partially (I left the screw in loosely, and used my spudger to disconnect the battery connector. Then I wrestled with the connector, reconnected the battery and tested with the case open. This saved a ton of time, though it obviously is more risky than removing the battery entirely.