 To avoid damaging an LED, we limit the amount of electrical current flowing from its power source using a resistor. You can find the right resistor value for your LED using your circuit supply voltage, the LED's forward voltage, and the LED's forward current value. You should be able to find those last two in the LED's product page or datasheet. When you can't find specific forward voltage for an LED, you can try using common values for a given LED color. In any case, the equation is pretty simple. Subtract the forward voltage from the supply voltage, then divide that result by the forward current. That final number is your ideal resistance value in ohms. In your actual circuit, use a resistor close to but not below that value, and your LED should stay bright and happy.