Table: aws_ecr_repositories

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

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

The primary key for this table is arn.

Relations

The following tables depend on aws_ecr_repositories:

Columns

NameType
_cq_iduuid
_cq_parent_iduuid
account_idutf8
regionutf8
arn (PK)utf8
tagsjson
policy_textjson
created_attimestamp[us, tz=UTC]
encryption_configurationjson
image_scanning_configurationjson
image_tag_mutabilityutf8
registry_idutf8
repository_arnutf8
repository_nameutf8
repository_uriutf8

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;