AWS Certified Devops Engineer Professional · Free Practice Question Medium
Question 4
A company runs several business-critical applications on Amazon EC2 instances in an Amazon VPC. The company requires the applications to be available 24/7 and there should be no outages except for pre-arranged updates. The DevOps team requires an automated notification mechanism that lets them know if the state of any of the instance’s changes.
-
A
Create an Amazon CloudWatch alarm for the StatusCheckFailed_Instance metric and select the EC2 action to reboot the instance.
-
B
Create a scheduled AWS Lambda function that checks the running state of the Amazon EC2 instances and updates the AWS Personal Health Dashboard.
-
C
Create an Amazon CloudWatch alarm for the StatusCheckFailed_System metric and select the EC2 action to recover the instance.
-
D
Create an Amazon EventBridge rule with an event pattern configured with the ‘EC2 Instance State-change Notification’ event type and send an Amazon SNS notification.
Reveal correct answer
Correct answer: D
Explanation
To receive email notifications when your instance changes state, create an Amazon SNS topic and then create an EventBridge rule for the EC2 Instance State-change Notification event. This will trigger a notification by SNS whenever the state of an EC2 instance changes.
CORRECT: "Create an Amazon EventBridge rule with an event pattern configured with the ‘EC2 Instance State-change Notification’ event type and send an Amazon SNS notification" is the correct answer (as explained above.)
INCORRECT: "Create a scheduled AWS Lambda function that checks the running state of the Amazon EC2 instances and updates the AWS Personal Health Dashboard" is incorrect.
The Personal Health Dashboard shows issues that may affect your resources. AWS updates the dashboard; it is not something you can do yourself.
INCORRECT: "Create an Amazon CloudWatch alarm for the StatusCheckFailed_System metric and select the EC2 action to recover the instance" is incorrect.
This would recover an instance if there were an issue with the underlying hardware that requires AWS to fix. However, the requirement here is simply to notify the team if the instance changes state.
INCORRECT: "Create an Amazon CloudWatch alarm for the StatusCheckFailed_Instance metric and select the EC2 action to reboot the instance" is incorrect.
As above, the team requires a notification if the state of the instance changes, they do not ask for automated recovery or restarting of instances.
References:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instance-state-changes.html
Save time with our AWS cheat sheets:
https://digitalcloud.training/aws-application-integration-services/
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
