the punishment by which sb spends the rest of their life in prison

sentence:
the punishment given by a court
a jail/prison sentence

a light/heavy sentence

to be under sentence of death

The judge passed sentence (= said what the punishment would be).

The prisoner has served (= completed) his sentence and will be released tomorrow.