Security in Container registry

Who may push, pull and manage what (IAM), what is audited, and what a public repository exposes.

Last updated 18 November 2026View as Markdown

IAM actions

Every request, through the registry, the API, the CLI, Terraform or the console, is checked against your IAM policies. A repository's resource name is rn:ews::<organization id>:ecr:repository/<repository id>; registry-wide settings (signing, pull-through cache, storage quota, aliases) are checked on rn:ews::<organization id>:ecr:*, and the lifecycle default on rn:ews::<organization id>:ecr:lifecycle-default/image.

ActionAccessWhat it allows
ecr:DescribeRepositoriesReadList and describe repositories
ecr:CreateRepositoryWriteCreate a container repository
ecr:UpdateRepositoryWrite · destructiveChange repository settings, including public/private visibility
ecr:DeleteRepositoryWrite · destructiveDelete a container repository
ecr:ListImagesReadList images and tags in a repository
ecr:DescribeImagesReadDescribe image details
ecr:DeleteImageWrite · destructiveDelete an image or tag
ecr:PushImageWrite · destructivePush images to a repository (docker push)
ecr:PullImageRead · sensitivePull images from a repository (docker pull)
ecr:GetAuthorizationTokenWriteMint a short-lived login token for docker login
ecr:GetLifecyclePolicyReadRead a repository's lifecycle policy and preview what it would expire
ecr:PutLifecyclePolicyWrite · destructiveSet the lifecycle policy that expires images in a repository
ecr:DeleteLifecyclePolicyWrite · destructiveRemove a repository's lifecycle policy
ecr:RestoreExpiredItemWriteBring back an image a lifecycle rule expired, while it is still restorable (with the tags nothing has taken since)
ecr:ScanImageWriteTrigger a vulnerability scan on an image
ecr:GetScanResultsReadView vulnerability scan results
ecr:GetRegistryStorageReadShow what the registry stores, per repository, against the quotas
ecr:PutRegistryStorageQuotaWriteSet or remove the organization's registry storage quota
ecr:DescribeRegistryAliasesReadList the registry aliases: references like ghcr.io/acme in workflow files that CI jobs send to this registry instead
ecr:PutRegistryAliasesWriteSet the registry aliases: which other-registry owners (ghcr.io/acme) CI jobs send to which namespace of this registry
ecr:DescribePullThroughCacheRulesReadList the pull-through cache rules and the upstream each mirrors
ecr:CreatePullThroughCacheRuleWriteMirror an upstream registry (Docker Hub, GHCR, …) under a prefix
ecr:UpdatePullThroughCacheRuleWriteChange a pull-through cache rule's upstream login
ecr:DeletePullThroughCacheRuleWrite · destructiveDelete a pull-through cache rule (cached images stay)
ecr:BatchImportUpstreamImageWriteBring an image in from the upstream on a pull through a cache rule (stores it in the registry)
ecr:DescribeImageSignaturesReadVerify an image's cosign and notation signatures against the trusted keys
ecr:GetSigningPolicyReadRead the signing policy: whether only signed images deploy, and the trusted keys
ecr:PutSigningPolicyWriteTurn "only signed images deploy" on or off for the organization
ecr:CreateSigningKeyWriteTrust a cosign public key or a notation certificate
ecr:DeleteSigningKeyWrite · destructiveStop trusting a signing key

Generated from the service’s IAM descriptor. Sensitive reads hand over secret material or source code and are recorded in the audit log like writes; destructive writes delete, overwrite or revoke.

  • A policy names one repository by its id, or all of them; there are no name prefixes such as team/*.
  • docker push needs ecr:PushImage on the repository; to a name that has no repository yet, ecr:CreateRepository on the registry instead.
  • docker pull needs ecr:PullImage, unless the repository is public and no credentials are sent. ecr:PullImage is marked sensitive and is not in the read-only policies.
  • A registry delete (DELETE /v2/<repository>/manifests/<reference>) needs ecr:DeleteImage, or ecr:PushImage.
  • Bringing an image in through a pull-through cache needs ecr:BatchImportUpstreamImage on the registry.
  • ecr:GetAuthorizationToken counts as a write: a login token carries your registry rights for 12 hours.
  • The console's repository pages need ecr:DescribeRepositories on the repository; without it they answer 404. Its Images tab lists images with that permission alone, while the API's image list needs ecr:ListImages.

Audit

A write through the API that reaches its permission check is recorded in the audit log, allowed or denied; issuing a login token counts as a write. A request refused before that, for a malformed id or body, is not recorded. In the registry protocol, creating a repository by a push and bringing an image in through a pull-through cache are recorded; pushes, pulls and deletes are not. See Audit log.

Public repositories

A public repository serves anonymous pulls only. An anonymous registry token names that one repository, grants pull and nothing else, and reaches only the layers its own images reference. Every write without credentials is refused with DENIED anonymous access is read-only.

Isolation

The registry host names your organization; a credential of another organization is refused. A layer is served from a repository only if that repository holds it, whatever its digest, so a digest from a build log reveals nothing in another repository.

Did this page help you?