Fix amazon linux dist

replaces #7408. Fixed to use ID. ping @tianon