restructure ami-event messaging flow