DEV Community

Learn2Skills for AWS Community Builders

Posted on • Updated on

Update: Lifecycle events for Amazon ECS are now available in Amazon CloudWatch Container Insights

Amazon CloudWatch Container Insights now includes Amazon Elastic Container Service lifecycle events (ECS). You can monitor, isolate, and diagnose containerized applications running on ECS using Container Insights. Now that lifecycle events have been added, you can easily correlate metrics, logs, and events in a single view for more complete operational visibility.

Container instance state change events, task state change events, and service action events are among the events. They are automatically sent to Amazon EventBridge by Amazon ECS and are also collected in CloudWatch in event log format. see Amazon ECS events.

Lifecycle events don't incur extra costs. Standard Container Insights pricing applies. see Amazon CloudWatch Pricing

To configure the table of lifecycle events and create rules for a cluster, you must have the events:PutRule, events:PutTargets, and logs:CreateLogGroup permissions.

To view the table of lifecycle events, you must have the events:DescribeRule, events:ListTargetsByRule, and logs:DescribeLogGroups permissions.

To view Amazon ECS lifecycle events in the CloudWatch Container Insights console

  1. Open the CloudWatch console at https://ap-southeast-1.console.aws.amazon.com/cloudwatch/home?region=ap-southeast-1#home:
  2. Choose Insights, Container Insights.
  3. In the drop-down box near the top of the page, choose Performance monitoring.
  4. In the next drop-down, choose either ECS Clusters, ECS Services, or ECS Tasks.

Image description

  1. If you choose ECS Services or ECS Tasks in the previous step, choose the Lifecycle events tab.
  2. At the bottom of the page, if you see Configure lifecycle events, choose it to create EventBridge rules for your cluster. The events are displayed below the container insights panes and above the Application Insights section. To run extra analytics and create additional visualizations on these events, choose View in Logs Insights in the Lifecycle Events table.

Latest comments (1)

Collapse
 
1oglop1 profile image
Jan Gazda

Enable Container Insights and watch your AWS bill grow like crazy!