Two things cause the rotten egg stink from hot water heaters.
1. Loss of magnesium anode.
Most of the more expensive heaters have a pencil type magnesium anode and when this anode is 'used up' the walls of the heater become the anode and this 'new' electro chemical reaction will put the normal fouling which contains sulphur bearing bacteria into solution releasing the 'stink'.
2. If there is no removable anode present, then suspect two things:
A. that you have a problem with the ground line on your dockside AC supply - and someone elses boat connected to your boat through the dockside AC ground is (or was) using your magnesium heater anode as its primary anode. If this common ground-throughout-the-marina is the problem - A galvanic Isolator is indicated for YOUR AC ground line.
B. If the water supply is well water from a private source, such stink could simply be the result of improper water 'softening' at that source.
Note: reversing electrical polarity potential (of anodes, etc) is used to 'descale' industrial and commercial water handling equipment .... rotten egg smell is prolific during those 'reverse current times' .... investigate the need for a galvanic isolator (A good one can be obtained through Yandina.com)
How shock sanitize and maintenance dose a water tank / water heater:
Turn the heater off when shock sanitizing.
1. Standard municipal water system shock sanitizing is @ 10-15 parts per million free chlorine in the water .... using normal 5% concentration of grocery store Clorox this would equate to 40 fluid ounces. of Clorox per 100 gallons of water ( 4 oz. per each 10 gallons of tank/system capacity). Let soak in the system for 1-2 hours, then drain/rinse several times.
Aluminum is quite reactive to SodiumHypoChlorite Chlorine so Id suggest no more than approx. 20 oz. per 100 gallons and a MAXIMUM soak time of 20-30 minutes ..... but do this twice a year instead of the normal once per year shock sanitizing. You'll just be replacing that aluminum tank sooner than one with stainless, etc.
How often should a non-aluminum tank be shock sanitized? At least at the start of any new boating season OR anytime when you can reach inside the tank and feel that the tank walls feel 'slimey' to the touch. That slime is a massive bacteria colony and if you cant open up and scrub it, you should consider to repeat the shock sanitizing over several days/weeks until you dont feel that 'slimey' sensation.
2. Maintenance dosage. 1 parts per million free chlorine.
For normal grocery store Clorox this will be approximately 4oz. Clorox per 100 gallons of water as a 'guide' ... as you should be using the 'nose test' to keep sufficient free chlorine in the system: Open the spiggot and let your WIFE or GIRLFRIEND, etc. smell the water ... if she can smell the barest amount of the acrid chlorine odor coming from the water, you have a sufficient amount in the system. Women have a much better smell perception than men so let the ladies of the boat do the 'smell test'. If no barest chlorine is noted, simply add more chlorox and repeat the 'smell test' until the 'smell test' positive - cookbook dosages are not valid, the nose test is very good.
Repeat the smell test between the times that you normally fill the tank as the chlorine will react with tank walls, hoses, etc. and ultimately will be 'consumed/used up' ... and you need that 'barest amount' to prevent microorganisms from growing and multiplying.
Shock dosage: 40oz/ per 100 gallons 1-2 hours of soak time. (non-aluminum tankage)
Maintenance dosage: 4 oz. per 100 gallons .... BUT use the 'nose test' at the spiggot and add when more necessary.