revert changes to postrun/db
implement aws_wait for next slave function