Wallerstein is a municipality and former principality in the district of Donau-Ries in Bavaria in Germany.