AMS prevents Chaos Bolt=Chaos damage
AMS does NOT prevent Rain from Above= Chaos Damage
This is the case with a number of other abilities such as Death from Above with Envenom. there seems to be a number of skills/spells that are not being accounted for when AMS goes up.
Chaos damage is, unfortunately, applied a little inconsistency. Chaos Bolt is all damage schools save Holy and Physical, which means it is absorbed by AMS. Chaos Strike, on the other hand, is all damage schools - no exception - which means it can still deal physical damage through AMS.
I can’t find an accurate spell description for Rain from Above, so I used a different example.
I suspect the primary differentiator comes from whether it’s considered a spell ability or a physical ability. And I use the term “physical” instead of “melee” as there are obviously times where it can be used from outside of melee range (such as Rain from Above).