Q100 — AWS DOP-C02 Ch.1

Question 100 of 100 | ← Chapter 1

A company shares a single AWS account among multiple development teams. Development team managers want to automatically stop Amazon EC2 instances and receive notifications when resources are idle and not tagged as production resources.

Correct Answer: C. Use a scheduled Amazon CloudWatch Events rule to invoke a custom AWS Lambda function that runs AWS Trusted Advisor checks. Create a second CloudWatch Events rule to filter Trusted Advisor events to trigger a Lambda function to stop idle non-production instances and send notifications.

Explanation

In this scenario, development team managers need to automatically stop idle and untagged-as-production Amazon EC2 instances and receive notifications when instances become idle. Option C provides a solution using a scheduled Amazon CloudWatch Events rule to invoke a custom AWS Lambda function that runs AWS Trusted Advisor checks. Trusted Advisor helps identify underutilized or idle Amazon EC2 instances. A second CloudWatch Events rule filters Trusted Advisor events to trigger a Lambda function that stops idle non-production instances and sends notifications. This approach satisfies the stated requirements, making C the correct answer.