Based on the monk's Vinaya (rules), intentionally killing a human being results in immediate expulsion from the monastic community where as killing a snake does not. Therefore, killing an infant is far more serious than killing a snake. 

This is based on the natural laws of kamma known within our heart. If we must kill the snake to save the infant, we should kill the snake because if we allow the snake to kill the infant, we will feel great regret & remorse in our heart &, even worse, other people will blame us for our lack of compassion towards the child. We may be socially ostracised. 

The snake was murdering the child thus the snake will reap its 'own kamma' (even though, in reality, animals are not subject to the laws of kamma). 

The scriptures (AN 6.63) teach 'kamma is intention' & 'kamma only comes into play due to sense contact'. Therefore, the only repercussions/consequences of killing the snake will be known within your own heart & nowhere else.