Is amoxicillin safe at 22 weeks

I’m 22 weeks pregnant and just got prescribed an amoxicillin for an ear infection i got the liquid cause its hard for my to swallow big pills is the liquid amoxicillin safe in pregnancy??