New battery cages will be banned from tomorrow, while existing cages will have to be removed under a staged phase-out over the next decade, with 45 per cent of existing cages to be removed by 2018.
Mr Carter said the code was a major shift for the industry.
"An immediate prohibition of battery cages would have an unacceptable impact on egg prices, industry structure and the stability of egg supply.
"The phased approach balances the welfare of layer hens with the time needed for producers to transition to other systems."
Green Party animal welfare spokeswoman Mojo Mathers said the new code still allowed chickens to suffer in colony cages.
"These colony cages do not meet the fundamental purpose of the Animal Welfare Act. By releasing this code the minister is entrenching the use of loopholes to allow factory farms to continue to keep animals in cruel conditions."
Egg Producers Federation chairman Michael Guthrie said he supported the general thrust of the code, which allowed the industry to leave behind the negative connotations of cages.
But he said the 10 year phase-out period was more likely to be four to six years in practice.
"This will have an enormous, possibly even crippling impact on many in the industry."
Mr Guthrie said farmers using battery cages would be able to salvage little of their current operations and would have to completely rebuild their farms from scratch, many on different sites.
The estimated cost of moving to colony cages was $150 million, while the cost of moving to free-range would exceed $250m.
NAWAC chairman John Hellstrom said the new welfare code was developed after reviewing the existing 2005 code and considering scientific evidence and submissions from the public.
The Animal Welfare (Layer Hens) Code of Welfare 2012 contains minimum standards and best practices for all aspects of layer hen care and handling, including the provision of food and water, shelter and health.
"The new code will ensure that hens live in an environment that meets their welfare needs and lets them carry out a range of normal behaviours, such as perching, pecking and scratching," Dr Hellstrom said.
Larger colony cages were acceptable under the code because they allowed hens to display a range of normal behaviours, he said.
"Colony cages are bigger, typically housing 40-60 birds, and include a secluded nesting area, perches and a scratching area."