Topic 1 Question 317
A company is experiencing issues with legacy software running on Amazon EC2 instances. Errors occur when the total CPU utilization on the EC2 instances exceeds 80%. A short-term solution is required while the software is being rewritten. A SysOps administrator is tasked with creating a solution to restart the instances when the CPU utilization rises above 80%.
Which solution meets these requirements with the LEAST operational overhead?
Write a script that monitors the CPU utilization of the EC2 instances and reboots the instances when utilization exceeds 80%. Run the script as a cron job.
Add an Amazon CloudWatch alarm for CPU utilization and configure the alarm action to reboot the EC2 instances.
Create an Amazon EventBridge rule using the predefined patterns for CPU utilization of the EC2 instances. When utilization exceeds 80%, invoke an AWS Lambda function to restart the instances.
Add an Amazon CloudWatch alarm for CPU utilization and configure an AWS Systems Manager Automation runbook to reboot the EC2 instances when utilization exceeds 80%.
ユーザの投票
コメント(4)
- 正解だと思う選択肢: B
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/UsingAlarmActions.html "For Whenever this alarm, choose State is ALARM. For Take this action, choose Reboot this instance."
👍 5eltiodolfo2023/06/21 - 正解だと思う選択肢: D
I think CloudWatch alarms needs to call AWS-RestartEC2Instance SSM runbook to do this. https://docs.aws.amazon.com/systems-manager-automation-runbooks/latest/userguide/automation-aws-restartec2instance.html
👍 1Gomer2023/06/13 From the AWS console: Alarm --> EC2 action Take the following action... Define what will happen to the EC2 instance with the Instance ID i-015f1589677551837 when this alarm is triggered. Recover this instance You can only recover certain EC2 instance types. See documentation Stop this instance You can only stop an instance if it is backed by an EBS volume. AWS will use the existing Service Linked Role (AWSServiceRoleForCloudWatchEvents) to perform this action. Show IAM policy document Terminate this instance You will not be able to terminate this instance if termination protection is enabled. AWS will use the existing Service Linked Role (AWSServiceRoleForCloudWatchEvents) to perform this action. Show IAM policy document Reboot this instance An instance reboot is equivalent to an operating system reboot. AWS will use the existing Service Linked Role (AWSServiceRoleForCloudWatchEvents) to perform this action. Show IAM policy document
👍 1vcloudpmp2023/06/17
シャッフルモード