Also, the thermocouple connection at the gas valve could be loose or dirty. Check that the pilot light flame surrounds the end of the thermocouple. There is a file on this site - Atwood Water Heater Service Manual - which gives some information about Atwood water heaters. If it is the thermocouple itself, they are not too expensive.
There's lots of advice and information in forums... sometimes it is correct. For example, all of my posts are made by a political appointee who got the job as a reward for contributions to my diesel bill.
2011 Jayco 28.5RLS; 2008 Chevy Duramax; Pullrite Superglide Hitch