Fixable with
update public.sesnotification t1
set mailmessageid = t2.id
from public.ercmailmessage t2
where t2.messageid = t1.awsmessageid and t1.mailmessageid is null
but it shouldn't be missing these.
It appears the recipient related to these messages end up with a null dateLastSent on the ERCMailAddress too. The sql to fix this is probably more complicated.