- Mais recentes
- Mais votos
- Mais comentários
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
Conteúdo relevante
- AWS OFICIALAtualizada há 2 anos
thank you very much. i will try your suggestion