The maker of the EpiPen is now the scourge of Capitol Hill, as lawmakers on both sides of the aisle slam a steep 400 percent price hike for the allergy treatment.

But a few years ago, President Obama and lawmakers enthusiastically passed a law that encouraged schools to stockpile EpiPens, which can stave off anaphylactic shock due to an allergic reaction. Now it appears Obama doesn't have any regrets for signing the 2013 law, according to White House press secretary Josh Earnest.

"The fact is … the medicine that is delivered through this equipment saves lives," he said Wednesday.

The 2013 School Access to Emergency Epinephrine Act doesn't mandate schools keep a stockpile of EpiPens, which deliver epinephrine, but it does give grants to schools that do.

"It is a promising day for millions of children and families who live life just one mishap away from catastrophe," said Valerie Jarrett, White House senior adviser, in a 2013 blog post.

Mylan, the maker of generic EpiPens, is in hot water after raising the price of the drug by more than 400 percent over the past nine years. The price hike has sparked questions and outrage from lawmakers.

But Earnest refused during the briefing to "second-guess" the pricing strategy or the "business practices of one private enterprise."

He said that companies will have to make decisions on their own but "there have been other pharmaceutical companies that have gotten a lot of unwanted attention for their pricing practices."

Earnest also did not comment on Mylan CEO Heather Bresch being the daughter of Sen. Joe Manchin, D-W.Va.