What should I do when I have a variable-length sequence when instantiating an LSTM in Keras?
In Keras, what you specify is the hidden layer size. So :

LSTM(128)


gives you a Keras layer representing a LSTM with a hidden layer size of 128.

As you said :


  From the LSTM/RNN unfolding image or description, I found that each RNN cell take one time step at a time


So if you picture your RNN for one time step, it will look like this : 



And if you unfold it in time, it look like this : 



You are not limited in your sequence size, this is one of the feature of RNN : since you input your sequence element by element, the size of the sequence can be variable.  

That number, 128, represent just the size of the hidden layer of your LSTM. You can see the hidden layer of the LSTM as the memory of the RNN. 

Of course the goal is not for the LSTM to remember everything of the sequence, just link between elements. That's why the size of the hidden layer can be smaller than the size of your sequence.

Sources :


Keras documentation
This blog


Edit

From this blog :


  The larger the network, the more powerful, but it’s also easier to overfit. Don’t want to try to learn a million parameters from 10,000 examples – parameters > examples = trouble.


So the consequence of reducing the size of hidden state of LSTM is that it will be simpler. Might not be able to get the links between the element of the sequence. But if you put a too big size, your network will overfit ! And you absolutely don't want that.

Another really good blog on LSTM : this link