How to restart EC2 instance from CloudWatch alarm

久未见 提交于 2019-12-06 04:21:30

You can let CloudWatch terminate your EC2 instance and let AutoScaling bring up another "fresh" instance with your application configured.

If only your application halt but EC2 instance works.

You could write a shell monitor the app using CloudWatch API and shoot the app when necessary,then make it a task in cron. Or you can using a shell right in your EC2 instance.

To restart your EC2 instance automatically is way too dangerous ,you can try Autoscaling, which automatically starts a new instance when your instance frozen and keep your SLA.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!