Under the watchful eyes of dozens of Office of Management and Budget employees and others at the Executive Building -- who he thanked for "your work and your dedication" -- the president used six pens to complete his signature on the massive piece of legislation that spells out how the federal government will spend $1.1 trillion over the next 8 1/2 months.
"Goodness gracious, that is a big piece of business; that is a big bill," Obama said while looking at a foot-tall box containing a printout of the bill.
"I'm always interested in, like, where do they have the boxes for the really big ones.
"What that represents is hours and hours and weekends and nights when people are paying attention and sweating the details, That's what you do.
"We would not be here, we would not be able to sign this legislation if it hadn't been for your work. This is my way of saying thank you."
Obama outlined the economic challenges facing the nation and pointed out actions his administration has taken to try to address them.
"We did everything we can to lay the foundation so we have a middle class in this country that is thriving and growing," he said. "We've made remarkable progress over the last five years, but we haven't made enough.
"Part of the reason we haven't made as much progress as we needed to is we had a series of self-inflicted wounds in this town in which a mindless sequester impeded growth in which we were governing by crisis sand brinkmanship."
He said hoped the spending bill would mean the government would operate without "too many glitches over the next year."
"Not only is that good for you, and all the dedicated public servants in federal government but most importantly it's good for the American people," he said.
Obama said the bill will fund "all our vital services, make sure that we are able to provide the needs for our veterans; to make sure that we are doing everything we need to do to advance our research agenda in this country and innovate; to make sure that we're investing in the job training that young people desperately need in order to get the skills to find that good-paying job."
Swim Week Miami Beach 2014 [PHOTOS]