Table: aws_ecr_repository_images

This table shows data for Amazon Elastic Container Registry (ECR) Repository Images.

https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_ImageDetail.html (opens in a new tab)

The primary key for this table is arn.

Relations

This table depends on aws_ecr_repositories.

The following tables depend on aws_ecr_repository_images:

Columns

NameType
_cq_iduuid
_cq_parent_iduuid
account_idutf8
regionutf8
arn (PK)utf8
artifact_media_typeutf8
image_digestutf8
image_manifest_media_typeutf8
image_pushed_attimestamp[us, tz=UTC]
image_scan_findings_summaryjson
image_scan_statusjson
image_size_in_bytesint64
image_tagslist<item: utf8, nullable>
last_recorded_pull_timetimestamp[us, tz=UTC]
registry_idutf8
repository_nameutf8

Example Queries

These SQL queries are sampled from CloudQuery policies and are compatible with PostgreSQL.

Unused ECR repository

WITH
  image
    AS (
      SELECT DISTINCT account_id, repository_name FROM aws_ecr_repository_images
    )
SELECT
  'Unused ECR repository' AS title,
  repository.account_id,
  repository.arn AS resource_id,
  'fail' AS status
FROM
  aws_ecr_repositories AS repository
  LEFT JOIN image ON
      image.account_id = repository.account_id
      AND image.repository_name = repository.repository_name
WHERE
  image.repository_name IS NULL;