Regular exercise has been a big help in keeping me feeling good, both mentally and physically.
I think the most important part of exercise is listening to your body and not overdoing it. My body is very sensitive, injures extremely easy and takes forever to heal. I stop immediately if something hurts while I'm doing it. Often, I'll hurt the next day if I do something my body doesn't like. Sometimes, it takes paying careful attention to figure out what triggered me so I can eliminate it.
Three times a week, I do a strength training program developed for me by my PT, which works on my core and basic muscle strenth, both upper and lower body as well as developing proprioception. I work with weights, therabands, a BOSU and a physioball. I find that I need to increse the number of repetitions and the amount of weight extremely slowly with these exercises or I'll injure myself.
I used to bicycle, rollerblade and ski, but right now those activities are too much for me. Despite doing them in small doses, I've managed to injure myself doing all three of them. For now, I'm grudgingly sticking to brisk walking, though I hold out hope of returning to other activities soon. I walk 2-4 miles almost every day. With gas at $4 a gallon, I'm focusing on walking instead of driving whenever possible.
I also have a stretching routine which I do most days. Additionally, I do Qigong, which I find helps with relaxation and posture and helps to stabilize my mood.
Experiment to find a form of exercise which is right for you. When you remember what you used to be able to do , it might be difficult for you to work with very light weights, but start small and work up slowly. Sometimes an activity can be modified so that you can tolerate it. If you can't use a standard bike, you might find that a recumbent bike is okay, for instance.
Is it possible for you to see a PT to help you with exercise? That might be helpful. My PT also worked with me on posture and biomechanics, helping me to correct faulty ways of moving. This has been immensely beneficial to me.
Don't give up on exercise as it will help you to feel better, reduce your pain and slow the progression of you AS.
Karen