Rigidity of Iwasawa nilpotent Lie groups via Tanaka's theory