DOWNLOAD OUR APPS
The length of Sommer's contract with Inter has not been specified but the transfer fee from Bayern Munich is estimated at six million euros ($6.6 million).
Cameroon's Onana left for Manchester United last month in a 57 million euro deal.
"Experience, leadership and dedication: these are the qualities that Sommer is ready to bring to the black and blue shirt," said the Inter press release announcing the player's arrival.
The 34-year-old, who has 83 caps for Switzerland, only joined Bayern in January to replace Manuel Neuer, who suffered a serious right knee fracture during a skiing trip in early December.
His contract was not due to expire until 2025 but Neuer is expected to reclaim the starting berth as soon as he is fit.
"I'll never forget my experience at such a great club," said Sommer on Instagram in his farewell message to the Bayern fans.
Sommer spent most of his career in Germany spending nine years with Borussia Monchengladbach before moving to Bayern.