Edwards, who left London Wasps by mutual consent earlier this month, had been heavily linked with a position in the England set up following his country of birth's poor World Cup campaign.
But the 45-year-old has disappointed England fans by agreeing to remain part of Warren Gatland's coaching set up as Wales look to build on their semi-final showing in New Zealand.
And as well as his customary role of defence coach to the senior side, Edwards will now also hold a similar position within the Wales National Academy set up.
"I am extremely pleased to be able to announce that we have secured Shaun's services for the WRU up to and including the Rugby World Cup in 2015," said WRU chief executive Roger Lewis.
"We have an outstanding team of coaches and back room staff working under Warren Gatland and Shaun's role as defence coach within that team is something quite unique.
"Talks began informally and discreetly in New Zealand with Shaun, and have continued over the past two weeks.
"I am particularly pleased to add that in addition to his extended senior national team duties under Warren, Shaun will also be working with WRU Head of Rugby, Joe Lydon, within the WRU National Academy.
"Shaun will work with the Wales U20's, 18's and 16's. This is part of our strategy to ensure our coaches have influence over our elite players early in their development."
As well as rumours suggesting Edwards could be on his way to Twickenham prior to this announcement, there had been talk that he may join up with Cardiff Blues on a part-time basis.
But that move is no longer on the cards, with Lewis claiming that Edwards would be working with an unnamed Aviva Premiership club one day a week, as well as sides within the semi-professional Welsh Principlaity Premiership on an ad hoc basis.
"Under the terms of the contract Shaun will be released one day a week, save Test match weeks, to work with an English Premiership club,"
"I have also negotiated the opportunity for Shaun to also work at times with Welsh Premiership clubs, which is particularly exciting for this level of our game.
"The Welsh rugby public, who have been so loyal to us, all can look forward to the next four years with great anticipation."