code before migrating AWS