If it's at the end of the level (two sets of large green gates at the top of the stairs), then you CAN defeat the AAT, but it takes ridiculous amounts of rocket shells. There are lots of them interspersed throughout the level in some hidden places.
However, the best way to finish the level is to throw the levers that open the gates and just make a break for it. You will have to force-push both levers.
Both levers are in upstairs areas. If you are facing the gate (and thus getting your a$$ shot off by the AAT), one is on the left, one is on the right. The one on the left can be thrown by standing on one of the pedestals at the base of the stairs, jumping and then force-pushing at the window. The one on the right you can jump up and hang on the windowsill in a window right next to the right side of the gate, then jumping in and going around the corner. Heads up though, there's a battle droid that lurks in there.
There are health packs in the upstairs right room and in the far left alleyway.