Both cephalexin and amoxicillin are considered to be safe during pregnancy and breastfeeding when needed. Your doctor and your baby’s doctor can help you decide what treatment is right for you and safe for your baby.