I still haven't found a way to defend against a steady AT-AT attack. Their range is greater than the range of turrets, so they slowly eat out the shields, then the wall, then turrets. And all that outside the range of rocket turrets.
My current layout has a trap field in front of defenses if the attacker wants to rush my base. Instant kill.
And if they want to take their time, they can walk across single-wall-block strewn field, starting on the far corners of the map.
But, nevertheless, as soon as AT-ATs reach my defenses, rockets just cannot reach them, and my base is annihilated step-by-step. Soooo helpless. Soooo frustrating.