AWS::ECR::RepositoryThe AWS::ECR::Repository resource specifies an Amazon Elastic Container Registry (Amazon ECR) repository, where users can push and pull Docker images, Open Container Initiative (OCI) images, and OCI compatible artifacts. For more information, see [Amazon ECR private repositories](https://docs.aws.amazon.com/AmazonECR/latest/userguide/Repositories.html) in the *Amazon ECR User Guide*.
9 configurable properties. Click a row to see details.
| Property | Type | Flags |
|---|---|---|
EmptyOnDelete | boolean | Write-only |
EncryptionConfiguration | EncryptionConfiguration | Create-only |
ImageScanningConfiguration | ImageScanningConfiguration | |
ImageTagMutability | string | |
ImageTagMutabilityExclusionFilters | Array<ImageTagMutabilityExclusionFilter> | |
LifecyclePolicy | LifecyclePolicy | |
RepositoryName | string | Create-only |
RepositoryPolicyText | objectstring | |
Tags | Array<Tag> |
Values returned after the resource is created. Access these with Fn::GetAtt.
| Attribute | Type | Description |
|---|---|---|
Arn | string | - |
RepositoryUri | string | - |
A minimal template with required properties and common optional ones.
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::ECR::Repository
Resources:
MyResource:
Type: AWS::ECR::Repository
Properties:
Tags:
- Key: Environment
Value: ProductionPermissions CloudFormation needs in your IAM role to manage this resource.
ecr:CreateRepositoryecr:PutLifecyclePolicyecr:SetRepositoryPolicyecr:TagResourcekms:DescribeKeykms:CreateGrantkms:RetireGrantecr:DescribeRepositoriesecr:GetLifecyclePolicyecr:GetRepositoryPolicyecr:ListTagsForResourceecr:DescribeRepositoriesecr:PutLifecyclePolicyecr:SetRepositoryPolicyecr:TagResourceecr:UntagResourceecr:DeleteLifecyclePolicyecr:DeleteRepositoryPolicyecr:PutImageScanningConfigurationecr:DeleteRepositorykms:RetireGrantecr:DescribeRepositoriesOur bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to NewsletterRepositoryNameThese properties cannot be changed after the resource is created. Updating them triggers a replacement.
RepositoryNameEncryptionConfigurationEncryptionConfiguration/EncryptionTypeEncryptionConfiguration/KmsKey