Amoxicillin while 22 weeks pregnant

I have a kidney infection and was prescribed amoxicillin 500mg but I’ve never taking it while pregnant they usually give me Bactrim. Has anyone took amoxicillin while pregnant?