Mads Pedersen and Andre Hahn earned Augsburg an historic win over Bundesliga leaders Bayern Munich, whose reply through Robert Lewandowski was not enough to prevent their second league defeat of the season.