Tarik Hassane, 22, of west London, will serve a minimum of 21 years after admitting conspiracy to murder and preparation of acts of terrorism.
Suhaib Majeed, 22, of west London, was convicted of the same charges and will serve a minimum of 20 years.
Two other men who provided a gun were also imprisoned for firearms offences.
Nyall Hamlett, 25, and Nathan Cuffy, 26, had admitted their role in handing over a gun to Majeed and Hassane, but denied knowing what it was going to be used for.
Hamlett was today jailed for six-and-a-half years and Cuffy for 11 years. They were cleared of conspiracy to murder and preparing terrorist acts.
During the sentencing at the Old Bailey, Mr Justice Wilkie said it was "shocking, tragic and deplorable" that Hassane and Majeed, "educated through the UK school system, undertaking university courses, should be so influenced by the bloodthirsty version of Islam presented by IS".
"You decided to take up arms against your fellow British citizens and those charged with protecting them, in the streets of your own city," he said.
The trial heard that Hassane, a medical student who split his time between London and university in Sudan, was immersed in extremist ideology and aspired to kill in London months before the IS group urged supporters in the West to carry out such attacks.
He turned to his childhood friend, Majeed - a physics undergraduate - to help him put the plan into action, with the pair communicating secretly through social media apps.
Majeed agreed to get a gun and moped for what would be a drive-by attack, the court heard.
Hamlett, a known criminal, supplied the weapon to Majeed after first acquiring it from Cuffy.
Soon afterwards the men were arrested. They had been under surveillance by the police and MI5.
Two British students have been jailed for life for plotting to kill police or soldiers in a shooting inspired by so-called Islamic State.