Hi, it may be because you are hypersensitive to beta lactums (penicillin, cephalosporin like cephalexin) and it is known to
cause skin rash, blistering, swelling and itching in susceptible individuals and you should better avoid this drug including penicillins in future and should go for other alternatives.
If it is allergy, it can be managed by using of appropriate anti-histaminic and steroids after consultation from physician.