The 27-year-old right-hander gets a $350,000 signing bonus and salaries of $2.5 million next year and $3.5 million in 2016 as part of Tuesday's deal. The Cardinals have a $5.25 million option for 2017 with a $250,000 buyout.
Walden was obtained by the Cardinals from Atlanta with outfielder Jason Heyward on Nov. 17 for pitchers Shelby Miller and Tyrell Jenkins. Walden made $1.49 million last season, when he was 0-2 with a 2.88 ERA and three saves as a setup man for closer Craig Kimbrel.
Walden has appeared in 50 or more games in three of the past four seasons and has a 12-13 career record with a 3.10 ERA, 38 saves and 254 strikeouts in 211 2-3 innings. He was an AL All-Star in 2011, when he had 32 saves for the Los Angeles Angels.