- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello SAS Community,
We are in the process of moving some services to the AWS cloud and have around 8 SAS instances running. Our goal is to create an automation script to shut these instances down during off-hours to save costs.
Here are a few specific questions we have:
- Shutdown Mechanism: When shutting down an EC2 instance using AWS commands, does it perform a graceful shutdown similar to a normal OS shutdown, or is it more like pulling the power cord?
- Shutdown Order: Is there a best practice for the order in which to shut down and start up instances? For example, should databases be shut down last and started first?
- Automation Tools: What are the recommended tools or methods for automating this process? We've looked into AWS Lambda and AWS Systems Manager but would appreciate guidance or examples.
- Handling Dependencies: How do we ensure that dependent services are shut down in the correct order to prevent issues?
Here is what we are currently considering:
- Using AWS Lambda triggered by CloudWatch Events to stop instances.
- Ensuring that our shutdown sequence handles dependencies correctly (e.g., web servers -> application servers -> databases).
Any insights, best practices, or sample scripts would be greatly appreciated!
Thanks in advance for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Any idea anyone?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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