Eight other people, including a woman, were sentenced to between six months and four years in prison.
The blast, shortly after take-off from Somalia’s capital, Mogadishu, killed the bomber and left a hole in the plane’s fuselage.
Somalia’s militant Islamist group al-Shabab said it carried out the attack.
However, it admitted at the time that it had failed in its attempt to bring down the plane.
The verdicts were the first in connection with the blast.
A former security official at the main airport in Mogadishu, Abdiwali Mahmud Maow, was given the life sentence, along with Arais Hashi Abdi, who was tried in absentia as he had evaded arrest.
The two were convicted of being members of al-Shabab.
The other eight were convicted of helping to plan the attack, but not of membership of the al-Qaeda-linked militant group.
None of the plane’s 74 passengers or crew was killed.
The explosion on the Daallo Airlines Airbus 321 flight happened about 15 minutes after take-off, when the plane was at around 11,000ft (3,350m) and the cabin was not yet fully pressurised.
It was able to make an emergency landing at Mogadishu airport, aborting its flight to Djibouti.
Daallo Airlines flies regularly from its base in Dubai to Somalia and Djibouti.
Somalian forces have long been fighting al-Shabab which carries out regular attacks in its quest to establish an Islamic state.