Amps is how much power is being drawn at a given moment. Amp hour is how much is drawn over a period of time. Same idea as watts and watt hour.
So say you are drawing 1 amp from a battery, the more amp hours it has, the more hours you can draw an amp before it is depleted. For a UPS get the highest amp hour battery you can fit in the unit, though it will be close or the same to what came with it.
The only thing you really want to be concerned about is the voltage of the battery and the chemistry. As long as you get lead acid 12v the amp hour does not matter, but the higher it is, the longer it will run for. Of course, for cheap UPSes with no fan or active cooling you can run into overheat problems if you put a bigger battery and it runs longer than it was meant to, but electrically it will be fine. Some people modify their UPS to put big RV/Marine batteries and it's fine. Though I prefer to use an inverter-charger for that as it will have better cooling and overall be better designed for it.
Also as a side note the amp hour rating of a battery is typically tested at a specific load. The rating actually changes based on the load. The more amps you draw from a battery the lower the AH rating is. When they rate them it's usually tested at a specific load, like say 20 amps. (usually it's based on a time though). Basically it's not linear. The less amps you draw the higher the amp rating is. A 100AH battery might be like 120AH if you're only drawing a few ma but it might also be like 50AH if you're drawing 100 amps. I don't know the actual curves so my numbers are wrong, and are just examples.