AWS DevOps Engineer Professional Practice Test

Disable ads (and more) with a membership for a one time $2.99 payment

Prepare for the AWS DevOps Engineer Professional Test. Enhance your skills with flashcards and multiple-choice questions, each offering hints and explanations. Become exam-ready!

Practice this question and more.


Which CloudWatch feature is used to track state changes for ECS instances or tasks?

  1. CloudWatch Events

  2. CloudWatch Logs

  3. CloudTrail Events

  4. CloudWatch Alarms

The correct answer is: CloudWatch Events

The correct answer is CloudWatch Events, as this feature is designed specifically for monitoring and responding to changes in state across AWS services, including ECS instances and tasks. With CloudWatch Events, you can set up rules to track various events related to your ECS resources. For instance, you can create an event rule to react to task state changes like task launch, stop, or failure. This allows you to automate actions, such as triggering a Lambda function to handle the state change or sending notifications through Amazon SNS. In contrast, while CloudWatch Logs are used for collecting and monitoring log files from your AWS resources, they do not provide functionality for tracking state changes. CloudTrail Events is more focused on logging and monitoring API calls made in your AWS account, which does not specifically address ECS state changes. CloudWatch Alarms are useful for monitoring metrics and sending notifications based on specific thresholds but do not track state changes directly. Overall, CloudWatch Events is the appropriate choice for tracking state changes in ECS, providing the necessary automation and event-driven capabilities for effective management of containerized applications.