The lifetime of your ammunition will be primary determined by the lifetime of the gunpowder inside.
Gunpowder is a high energy compound that breaks down over time. It is mixed with stabilizers that are consumed during powder deterioration. At some point, no more stabilizers.
Nitrocellulose-base propellants are essentially unstable materials that decompose on aging with the evolution of oxides of nitrogen. The decomposition is autocatalytic and can lead to failure of the ammunition or disastrous explosions.
ROLE OF DIPHENYLAMINE AS A STABILIZER IN PROPELLANTS;
ANALYTICAL CHEMISTRY OF DIPHENYLAMINE IN PROPELLANTS
http://www.dtic.mil/dtic/tr/fulltext/u2/783499.pdf
Heat, as you can see in the report, will age gunpowder
Heat is the primary enemy of gunpowder. If you search the literature you will find that suspect gunpowder is aged in 150 F ovens. If the stuff fumes in a month it is further tested for stabilizer content. The US military scraps the stuff when the stabilizer gets to less 20% original content. Heat is bad, more heat is bad, very hot is bad, bad, bad.
A rule of thumb for safe gunpowder storage is 20 years for double based and 45 years for single based. Storage in hot, like 120 F attics, will dramatically reduce the lifetime.
Humidity is bad because water is a polar molecule and it interacts with the double bonds on the nitrocellulose molecule, breaking the powder down. Water also wicks the nitroglycerine in the grain to the surface changing the burn rate of the powder. Anything ionic, like rust, is just as bad.
Primers last a very long time, current styphnate primers have a much longer storage life than gunpowder. I asked an insensitive munitions expert and he did not know. Gave a “forever” sort of estimate. Obviously it is not forever, but it might be longer than our natural lives. Which for all practical purposes, is forever, unless you believe in reincarnation and plan to will the stuff to yourself in your next incarnation.
The best storage conditions for ammunition is unchanging arctic. Totally cold and totally dry.