Rivera, 33, was hitting .243 with six home runs and 28 RBIs when he was designated for assignment by the Blue Jays on July 3. But he was hitting .327 against left-handed pitching, with a .909 OPS.
"Juan will be the right-handed counterpart to Tony Gwynn Jr. in left field, and he can fill in at first base," said general manager Ned Colletti.
Rivera is only two seasons removed from slugging 25 homers with 88 RBIs for the Angels, who traded him and Mike Napoli to the Blue Jays in January in the Vernon Wells deal. Toronto will pick up almost all of the remainder of Rivera's $5.25 million salary. Rivera, who began his career with the Yankees, also played for the Montreal Expos.
Rivera can also play first base, where he would be a right-handed backup to James Loney.
The Venezuela native has appeared in six American League Division Series, three AL Championship Series and one World Series, in 2003 with the Yankees, for a total 36 postseason games. He also played for Venezuela in the inaugural World Baseball Classic in 2006.
Thames was signed to a $1 million free-agent contract to be a right-handed-hitting platoon left fielder. While dealing with leg injuries, he has hit only .197 with two homers and seven RBIs.
Ken Gurnick is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.