A SysOps Administrator needs to enable Amazon CloudWatch Container Insights to collect performance metrics from an existing Amazon Elastic Container Service (Amazon ECS) cluster. Which TWO actions can the SysOps Administrator take to enable Container Insights for this cluster? (Select TWO.)
- Run the AWS CLI command: aws ecs update-cluster-settings --cluster <cluster-name> --settings name=containerInsights,value=enabledAnswer
- Update the cluster settings in the Amazon ECS console by modifying the cluster properties to turn on Container Insights.Answer
- CEnable detailed 1-minute monitoring on all Amazon EC2 launch templates used by the ECS cluster Auto Scaling group.
- DCreate an Amazon EventBridge rule that triggers an AWS Systems Manager Automation document to install the CloudWatch agent on each ECS container instance.
- EConfigure a CloudWatch Logs log group for the ECS cluster and set the retention period to never expire.
Answer
To enable Amazon CloudWatch Container Insights on an existing Amazon ECS cluster, you can either execute the AWS CLI command `aws ecs update-cluster-settings` with the `containerInsights` setting enabled, or modify the cluster's settings directly within the Amazon ECS console.
To collect performance metrics at the container and task level for an existing ECS cluster, Container Insights must be enabled at the cluster level. This can be configured either visually by modifying the cluster properties within the Amazon ECS console, or programmatically by running the AWS CLI command `aws ecs update-cluster-settings` with the `name=containerInsights,value=enabled` settings parameter.
Step-by-Step Solution
Key Concept
Configuring Container Insights for Amazon ECS clusters