Naa’imur Zakariyah Rahman, 21, planned to bomb the gates of 10 Downing Street, kill guards and then attack the Prime Minister with a knife or gun.
He had pledged allegiance to IS and collected what he thought was an explosives-packed puffa jacket and rucksack when he was arrested last November.
The drifter, originally from Birmingham, thought he was being helped by an IS handler when in fact he was talking to undercover officers.
He was snared by a network of undercover counter-terrorism officers from the Metropolitan Police, the FBI and MI5 in November of last year.
Rahman, from Finchley, north London, was found guilty of preparing acts of terrorism despite claiming he was set up.
During his Old Bailey trial, he admitted to helping a friend to join IS in Libya by recording an IS sponsorship video.
Following his conviction, he told a probation officer that he would have carried out the attack if he had been able to.
The “clever and cunning” young man had the potential to “operate below the radar to dreadful effect”, according to a pre-sentence report.
Justice Haddon-Cave concluded: “Rahman is a very dangerous individual and it is difficult to predict when, if ever, he will become de-radicalised and no longer be a danger to society.”
The judge sentenced Rahman to life in prison with a minimum term of 30 years.
For the IS sponsorship video, Rahman was handed six years in prison to run concurrently.
The judge stressed the undercover officers involved in the case were “scrupulous” at all times and Rahman was the “instigator and author” of his own actions.