The 21-year-old replaces Welsh international Jason Brown who left the club after eight months of frustration at having his first-team place taken by Jamie 'Clangers' Langfield.
Twardzik is former Germany youth player whose brothers Filip and Patrik are with Celtic. The player was foundering in Italy's third-tier after having trained with Aberdeen last October.
Twardzik said: "After spending a week here earlier in the season I made up my mind that this was the place I wanted to come to and was delighted when the club approached me on Tuesday evening and said that they wanted me."
Dons chief executive Duncan Fraser added: "Jim Leighton rates the former Bayern Munich goalkeeper very highly and we are delighted to be able to tie this deal up."