Hi. Ankylosing Spondylitis requires long term treatment (not life long but many months - years, depending on how your symptoms/ reports are). There is a way to slowly taper (reduce) the medication dose and then if possible to discontinue medicines, which can only be properly done by a specialist. If you suddenly stop medicines after pain relief, your symptoms will recur and you may have permanent joint damage as well
Next Steps
Consult your Rheumatologist regarding further management