An LED lamp and a power source module thereof are provided. The power source module includes a switch-type DC-to-DC converter integrated with a function for detecting whether a foreign external impedance exists. The switch-type DC-to-DC converter is configured to enter an installation detection mode when the switch-type DC-to-DC converter is activated. When the switch-type DC-to-DC converter is in the installation detection mode, the switch-type DC-to-DC converter receives an external AC signal received by the LED lamp to detect whether a foreign external impedance exists based on the received signal.