SSM runs with minimal PATH that doesn't include nvm-managed node. Source nvm.sh before executing migrate.js.