AWS Fundamentals Logo
AWS Fundamentals
AWS::ECR::PublicRepository

ECR PublicRepository

The AWS::ECR::PublicRepository resource specifies an Amazon Elastic Container Registry Public (Amazon ECR Public) repository, where users can push and pull Docker images, Open Container Initiative (OCI) images, and OCI compatible artifacts. For more information, see [Amazon ECR public repositories](https://docs.aws.amazon.com/AmazonECR/latest/public/public-repositories.html) in the *Amazon ECR Public User Guide*.

Properties

4 configurable properties. Click a row to see details.

Filter:
PropertyTypeFlags
RepositoryCatalogData
object
RepositoryName
string
Create-only
RepositoryPolicyText
objectstring
Tags
Array<Tag>

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
Arnstring-

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::ECR::PublicRepository

Resources:
  MyResource:
    Type: AWS::ECR::PublicRepository
    Properties:
      Tags:
        - Key: Environment
          Value: Production

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

ecr-public:CreateRepositoryecr-public:SetRepositoryPolicyecr-public:PutRepositoryCatalogDataecr-public:TagResource

read

ecr-public:DescribeRepositoriesecr-public:GetRepositoryPolicyecr-public:GetRepositoryCatalogDataecr-public:ListTagsForResource

update

ecr-public:DescribeRepositoriesecr-public:SetRepositoryPolicyecr-public:DeleteRepositoryPolicyecr-public:PutRepositoryCatalogDataecr-public:TagResourceecr-public:UntagResource

delete

ecr-public:DeleteRepository

list

ecr-public:DescribeRepositories

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

ServiceECR
Properties5
Required0
TaggingSupported
Primary IDRepositoryName

Supported Operations

CreateReadUpdateDeleteList

Immutable After Creation

These properties cannot be changed after the resource is created. Updating them triggers a replacement.

RepositoryName

External Links