To be an IAS offocer you have to crack cse exam conducted by upsc. You have to crack all the prelims, mains and then interview.
The minimum eligibility criteria to give this exam is that you should have complete your bachelor degree. And the age limit is that a candidate should be a minimum of 21 years and maximum 32 years old as on August 01, 2019 but there is relaxation of 5 years for sc, st and 3 years relaxation for obc. For General Candidates there is maximum 6 attempts (Up to 32 Years) for this exam, for Scheduled Caste and Scheduled Tribe Candidates there is no Limits and for Other Backward Classes there is 9 attempts ,for Physically handicapped- 9 attempts.
I hope my answer will help you out