AWS Distro for OpenTelemetry

Create ECS EC2 Task Definition for EC2 instance with ADOT Collector

Create ECS EC2 Task Definition for EC2 instance with ADOT Collector

In this tutorial, we will demonstrate how to create an ECS Task Definition for EC2 with ADOT Collector.




Setup for ECS EC2

  1. Download the ECS EC2 instance metrics task definition template from GitHub.
  2. Fill the following parameters in the task definition templates:
    • {{region}} - the region the data will be sent to
    • {{ecsTaskRoleArn}} - AWSOTTaskRole ARN created in the previous section
    • {{ecsExecutionRoleArn}} - AWSOTTaskExcutionRole ARN created in the previous section
    • command - Assign value to the command variable to select the config file path; the ADOT Collector comes with --config=/etc/ecs/otel-instance-metrics-config.yaml - To use ECS EC2 instance metrics
  3. Follow the ECS EC2 setup instructions to create a task definition using the given template.

On this page