The deal is for four years for $17.84 million with a team option for a fifth.
"I don't think we've ever signed a rookie, day one, walking in the door," team president Michael Bidwill told the Cardinals' official website on Thursday.
The Cardinals' rookie minicamp starts Friday.
The 6-foot-4, 218-pound Rosen was a three-year starter at UCLA and appeared in 30 games, completing 712 of 1,170 pass attempts for 9,340 yards and 59 touchdowns in his college career.
He set UCLA records for 300-yard passing games and the most games in school history with 350-plus passing yards (10). He threw at least one touchdown pass in 28 of his 30 career games, had multiple touchdown passes in 17 games and at least three touchdown passes in 10 games.
As a junior in 2017, Rosen started all 11 games and completed 282 of 452 passes (62.6 percent) for 3,756 yards and 26 touchdowns. He led the Pac-12 in passing yards per game (341.5) and total offense per game (332.6).
"It's been a long couple of months," Rosen told the Cardinals' official website. "Finally, we get to get back to some actual football."