I’m not sure who it’s by, but it could very well be Hitchcock.
The protagonist is holed up in a barrack type arrangement in what I seem to remember is the jungle of South America and a bunch of army ants are heading his way to kick his ass. He’s dug a moat around the whole place and filled it with water and gasoline on top.
Anyhow, the ants come, stomp into the moat, he tries to roast them, they start climbing trees and dropping on his side of the moat, etc. etc.
Does this ring any bells for anyone? I can’t actually remember how it ends and it’s bugging me.