- Newest
- Most votes
- Most comments
If the only requirement is to retain the instances on scale in. You can leverage instance termination protection in auto scaling. This would allow you to take adavantage of all the features of auto scaling, and still retain the instances. https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html
If you absolutely cannot use auto scaling, you can leverage EventBridge to invoke a Lambda to run your python script that will interact with EC2. https://aws.amazon.com/premiumsupport/knowledge-center/start-stop-lambda-eventbridge/
In CloudWatch, create an Alarm on the Auto Scaling Group metric such as CPUUtilization. For the Notification, create or select an SNS topic. Then subscribe your Lambda function to this topic.
thank you very much i will try your suggestion
Relevant content
- asked 2 years ago
- asked 2 years ago
- asked a year ago
- asked a year ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a year ago
thank you very much. i will try your suggestion