He began his career with Norwich City but did not make a competitive appearance for them, serving loans with Stockport County and Morecambe. In early 2008 he moved to Peterborough United, and was the regular goalkeeper during four seasons in which the club were promoted twice, relegated then promoted again. He lost his place in the team, and in 2012 moved to Cardiff City where he had a backup role and went out on loan to Blackpool and Fulham. In 2016 he moved to Scotland with Aberdeen, being installed as first choice and playing in three cup finals in his first three seasons; he was named captain in 2019.
Lewis also represented England at several youth levels up to under-21.
Born in Bury St Edmunds, Suffolk, Lewis had been involved with Norwich City's youth system since 1995 at the age of eight. In August 2003 he agreed to join Norwich, the club his family supported, as a scholar at the culmination of his studies at Bungay High School in the summer of 2004. Before reaching 16 he spent time as the Norwich first team's substitute goalkeeper, but did not make an appearance. He turned professional in October 2004, but got no nearer to a first team debut than being named on the bench for portions of 2004–05 and 2005–06. The sale of first-choice goalkeeper Robert Green meant that Lewis became second-choice goalkeeper at Carrow Road before a fractured cheekbone sustained in a reserve team game against Leyton Orient prompted the loan signing of Lee Camp.
After an initial trial with Bury, Lewis joined Stockport County on loan in March 2007 for the remainder of the 2006–07 season, playing five games and keeping three clean sheets. He was rewarded with a three-year deal at Norwich, in May 2007. At the beginning of 2007–08, Lewis joined Morecambe on a five-month loan to gain more first-team experience.
Lewis signed for Peterborough United on 8 January 2008, for a reported fee of £400,000, breaking the club's record transfer fee. He went on to make his debut against Macclesfield Town on 12 January. At the end of the season Peterborough finished as runners-up in League Two, meaning they were promoted to League One.
His first full season at London Road Stadium resulted in another promotion where the club won promotion to the Championship. On 13 April 2009, Lewis was made to face a penalty three times against Millwall in an unusual refereeing decision. After David Martin of Millwall was tripped and a penalty awarded against Peterborough, Lewis was twice judged by the assistant referee to have moved off his line before the ball had been struck by Gary Alexander – on both occasions Lewis saved the penalty. At the third attempt, Millwall replaced the unsuccessful Alexander with Martin, who scored and this time the penalty stood. Speaking on Sky Sports News after the event, ex-referee Dermot Gallagher commented that whilst the assistant was consistently working to the letter of the law, his decisions were harsh.
However his first season in the Championship wasn't as much of a success which resulted in relegation back down to the third tier. Peterborough started off strongly and Lewis was first choice keeper nearly all the season, however after fracturing his kneecap (and playing a whole half with it fractured) against MK Dons in the play-off semi final, he was forced to miss the second leg and final through injury. Peterborough went on to win promotion, defeating Huddersfield 3–0 in style in the final. During his fifth season at Peterborough, Lewis was replaced as first choice keeper permanently by Paul Jones and only made 12 appearances. His last appearance for the club came on 14 February, in a 3–1 loss at Cardiff City. On 30 April, Lewis was released by the club at the end of his contract, with Cardiff City and Ipswich Town interested in signing him.
On 25 May 2012, Lewis agreed a three-year deal at Welsh club Cardiff City, which would commence on 1 July, where he linked up with former Norwich City teammates, Malky Mackay (at the time manager of Cardiff) and David Marshall. He made his debut for the club on 14 August, in a League Cup defeat to Northampton Town, and a second appearance came in the FA Cup exit at Macclesfield Town in January.
On 5 August 2014 he joined Blackpool on a season-long loan. He made his debut for the club on 9 August. On 24 January 2015, he was omitted from the line-up to face Watford at Vicarage Road. Blackpool manager Lee Clark initially gave the reason as being a tactical – not monetary – one, but it was later revealed that Blackpool would have to pay his parent club a fee of ₤40,000 after Lewis had made a certain number of appearances for Blackpool. The payment would entitle Blackpool to sign Lewis permanently at the end of the loan deal. Blackpool attempted to terminate the loan, but the Bluebirds refused.
On 24 August 2015, Lewis joined Fulham on a season-long loan.
On 15 June 2016, Lewis signed for Scottish Premiership club Aberdeen. He made his debut for the club on 30 June 2016, in a Europa League First qualifying round tie against Fola Esch. Lewis started all matches for the Dons in 2016–17, and signed a new deal at the end of the season to keep him at the club until 2020. Lewis continued to play regularly for Aberdeen over the next two seasons, and extended his contract with the club until 2024 in May 2019.
In May 2008, he received a call-up to the senior England squad, replacing an injured Chris Kirkland for the friendlies against USA and Trinidad and Tobago. However, Lewis was an unused substitute for both games.