DOP-C02 exam dumps

DOP-C02 practice question 282 of 411

AWS Certified DevOps Engineer - Professional. Professional level, Amazon Web Services. Free question with the correct answer and a full explanation.

DOP-C02 Question 282

Select 2

Your team manages an application running on Amazon EC2 instances behind an Auto Scaling group. You need to implement a solution to automatically recover an instance if it becomes unhealthy, and also notify your team via email whenever such a recovery action is triggered. What is the most appropriate solution to achieve this using AWS services?

  1. A

    Configure an Amazon CloudWatch alarm to monitor the EC2 instance's health status and set the alarm action to recover the instance.

  2. B

    Use Amazon SNS to send email notifications when the CloudWatch alarm enters the 'ALARM' state.

  3. C

    Attach a Lambda function to the CloudWatch alarm to recover the instance and send notifications.

  4. D

    Enable the Auto Scaling group's health check and configure it to replace unhealthy instances automatically.

  5. E

    Create an EventBridge rule to monitor EC2 instance state changes and trigger a recovery action.

Show answer and explanation

Correct answers: A, B

Explanation

The correct solution involves configuring a CloudWatch alarm to monitor the EC2 instance's health status and setting its action to recover the instance. To notify the team, the alarm can be integrated with Amazon SNS to send email notifications. This approach leverages native AWS services without requiring custom workflows or additional configurations.

  • A. Correct.

    Correct: CloudWatch alarms can be configured to monitor EC2 instance metrics, such as instance health, and take recovery actions directly when the alarm state is triggered.

  • B. Correct.

    Correct: Amazon SNS can be integrated with CloudWatch alarms to send email notifications when the alarm enters the 'ALARM' state.

  • C. Incorrect.

    Incorrect: While Lambda can be used for custom recovery workflows, this is unnecessary here because CloudWatch alarms natively support instance recovery actions and SNS notifications.

  • D. Incorrect.

    Incorrect: Enabling Auto Scaling health checks ensures that unhealthy instances are replaced, but it does not provide email notifications or recover the same instance.

  • E. Incorrect.

    Incorrect: EventBridge rules are useful for monitoring events and triggering workflows, but they are not required for this specific use case since CloudWatch alarms directly support instance recovery and SNS notifications.

Timed practice exam

Take a DOP-C02 practice test under exam conditions

75 questions in 180 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam