AWS::ECR::ReplicationConfiguration - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


The AWS::ECR::ReplicationConfiguration resource creates or updates the replication configuration for a private registry. The first time a replication configuration is applied to a private registry, a service-linked IAM role is created in your account for the replication process. For more information, see Using Service-Linked Roles for Amazon ECR in the Amazon Elastic Container Registry User Guide.


When configuring cross-account replication, the destination account must grant the source account permission to replicate. This permission is controlled using a private registry permissions policy. For more information, see AWS::ECR::RegistryPolicy.


To declare this entity in your Amazon CloudFormation template, use the following syntax:


{ "Type" : "AWS::ECR::ReplicationConfiguration", "Properties" : { "ReplicationConfiguration" : ReplicationConfiguration } }


Type: AWS::ECR::ReplicationConfiguration Properties: ReplicationConfiguration: ReplicationConfiguration



The replication configuration for a registry.

Required: Yes

Type: ReplicationConfiguration

Update requires: No interruption

Return values


The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.


The account ID of the destination registry.


Specify a replication configuration for a private registry

The following example specifies a replication configuration in a source Region for a private registry to replicate the contents to the us-east-2 and us-west-1 Regions within the same account.


"TestReplicationConfiguration": { "Type": "AWS::ECR::ReplicationConfiguration", "Properties": { "ReplicationConfiguration": { "Rules": [ { "Destinations": [ { "Region": "us-east-2", "RegistryId": "123456789012" }, { "Region": "us-west-1", "RegistryId": "123456789012" } ] } ] } } }


Resources: MyReplicationConfig: Type: AWS::ECR::ReplicationConfiguration Properties: ReplicationConfiguration: Rules: - Destinations: - Region: "us-east-2" RegistryId: "123456789012" - Region: "us-west-1" RegistryId: "123456789012"