Skip to content

AWS ECR

Collect Metrics Data from AWS Elastic Container Registry

Configuration

Install Func

It is recommended to activate the TrueWatch Integration - Extensions - DataFlux Func (Automata): All prerequisites are automatically installed. Please proceed with the script installation.

For self-deploying Func, refer to Self-deploying Func

Install Script

Note: Please prepare the required Amazon AK in advance (for simplicity, you can directly grant the global read-only permission ReadOnlyAccess).

  1. Log in to the Func console, click on 【Script Market】, and enter the TrueWatch Script Market. Search for: integration_aws_ecr.

  2. Click 【Install】, then input the corresponding parameters: AWS AK ID, AK Secret, and account name.

  3. Click 【Deploy Startup Script】, the system will automatically create the Startup script set and configure the corresponding startup scripts.

  4. After enabling, you can see the corresponding automatic trigger configuration in 「Manage / Automatic Trigger Configuration」. Click 【Execute】 to immediately execute once without waiting for the scheduled time. Wait a moment, and you can check the execution task records and corresponding logs.

Verification

  1. In 「Manage / Automatic Trigger Configuration」, confirm whether the corresponding task has the automatic trigger configuration. You can also check the corresponding task records and logs for any anomalies.
  2. In TrueWatch, check if asset information exists in 「Infrastructure - Resource Catalog」.
  3. In TrueWatch, check if there are corresponding monitoring data in 「Metrics」.

Metrics

Configure Amazon CloudWatch to collect more metrics. Amazon CloudWatch Metrics Details

AWS Elastic Container Registry metrics are under the aws_AWS/ECR Measurement. The description column includes the description of each metric along with its unit and statistics.

Metric Description Unit
RepositoryPullCount Total number of image pulls from the repository Count

Objects

The collected AWS Elastic Container Registry object data structure can be viewed in 「Infrastructure - Resource Catalog」.

{
  "measurement": "aws_ecr",
  "tags": {
    "repositoryArn"            : "xxxxxxxx",
    "registryId"               : "03babd100fxxxxxxx",
    "repositoryName"           : "test",
    "repositoryUri"            : "urlxxxxxx",
    "RegionId"                 : "03babd100fxxxxxxx"
  },
  "fields": {
    "createdAt"                : "3",
    "imageTagMutability"       : "2025/07/18 17:23:04",
    "encryptionType"           : "xxx"
  }
}

Note: The fields in tags and fields may change with subsequent updates.