SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
Development resources, articles, tutorials, code samples, tools and downloads for AWS Amazon Web Services, Redshift, AWS Lambda Functions, S3 Buckets, VPC, EC2, IAM

AWS: Suspend Auto-Scaling Group Processes and Disable Auto Scaling


In this AWS tutorial, I want to share how an AWS architect or a developer can suspend auto scaling group processes which enables users to disable auto scaling for a period of time instead of deleting the auto-scaling group from their AWS resources.

Recently for a PoC, a product evaluation for a limited time, I have subscribed to a Data Warehouse platform Pivotal Greenplum using Amazon Marketplace subscriptions on AWS cloud. Since the installation of the single node cluster setup of the platform was automatically completed using an AWS CloudFormation template, I was not fully aware of the setup configuration. I decided to stop the EC2 instance where the DWH is running on for the time where no one is connected and is using the data warehouse solution, so I could save some money on EC2 resources.

After some time, I realized that each time I stop the EC2 instance, that instance is terminated and a new instance with a new private IP address is launched. I was surprised to see the instance is running, IP is changed when I launch the EC2 dashboard and checking the mentioned EC2 server. At first I could not find a way to stop EC2 instance for cost saving

AWS EC2 instance is terminated after stopping instance

I later realized with the support of Greenplum consultants the reason behind this behavior is the Auto-Scaling Group created with the marketplace subscription during CloudFormation execution. When I checked the resources tab of the AWS CloudFormation stack, I see that an Auto-Scaling group is created by that stack execution.

Auto-Scaling Group resource created by AWS CloudFormation stack execution

Above you can see the link to the Auto-Scaling group resource. If you click on the resource link, it will launch the AWS EC2 Service Dashboard page and display the related Auto Scaling Group details.

After the root cause of launching a new EC2 instance running the Data Warehouse software is found, I decided to simply suspend auto-scaling processes or in other words I decided to disable auto scaling processes.

When you select the auto scaling group and from Actions menu choose Edit option, you can now modify the auto scaling processes which will enable developers and administrators to disable or suspend auto scaling processes like terminating the instance and launching a new EC2 instance, etc.

edit auto scaling group to suspend processes

On the auto-scaling group details page in Edit mode, you will see an input box for "Suspended Processes"
By default, this entry was empty meaning all the processes as seen now in below screenshot, are active and running.

suspend auto scaling processes like launch and terminate

I decided to suspend all processes of the auto-scaling group created by the AWS CloudFormation stack for the single node data warehouse cluster. So I clicked on the "Suspended Processes" input box and select all the processes defined for the auto scaling group including Launch, Terminate and HealthCheck processes. This change enabled me to deactive auto scaling group for the AWS EC2 instance.

After saving this last modification, after I stop the EC2 instance, that instance is not terminated and a new instance is not launched any more automatically.
I could successfully disable auto-scaling features for the EC2 instance which belongs to the cloud Data Warehouse platform.
Of course, I suspended auto-scaling for the data warehouse platform only for PoC period since unfortunately I could not work very intensively all the time on that database for the cloud.

As the tooltip provides you can find more information about suspending and resuming auto scaling processes, please refer to this AWS documentation



AWS


Copyright © 2004 - 2021 Eralper YILMAZ. All rights reserved.