You could look at using SAS_lsm to manage gracefully shutting down the SAS 9 services in the correct order.
https://github.com/sassoftware/SAS-lsm/tree/master
For Viya 3.x, there is viya-ark to do this:
https://github.com/sassoftware/viya-ark
For Viya 4, there is a supplied cronjob to stop Viya.
I'm on Azure and not AWS, but I use a scheduled script that runs a graceful stop of SAS services (like SAS_lsm on SAS 9 and viya-ark on Viya) and then stops and deallocates the VMs using the CLI (or in the case of Kuberentes, stops the cluster).
I expect that VM shutdown is graceful and not like pulling the power cord, though AWS support may be able to provide more detail on that functionality.
--
Greg Wootton | Principal Systems Technical Support Engineer