Creating a replication configuration - Amazon Elastic File System
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).

Creating a replication configuration

You can use the Amazon EFS console, the API, or the Amazon CLI to replicate an EFS file system. The following sections provide you with detailed instructions for using each of these methods.

  1. Sign in to the Amazon Web Services Management Console and open the Amazon EFS console at https://console.amazonaws.cn/efs/.

  2. Open the file system that you want to replicate:

    1. In the left navigation pane, choose File systems.

    2. In the File systems list, choose the Amazon EFS file system that you want to replicate. The file system that you choose cannot be a source or destination file system in an existing replication configuration.

  3. Choose the Replication tab, and then, in the Replication section, choose Create replication. The Create replication page opens.

  4. In the Replication settings section, define the replication settings:

    1. For Replication configuration, choose whether to replicate the file system to a new or existing file system.

    2. For Destination Amazon Web Services Region, choose the Amazon Web Services Region in which to replicate the file system.

  5. If you are replicating to a new destination file system, in the Destination file system settings section, define the destination file system settings.

    1. For File system type, choose a storage option for file system.

      • To create a file system that stores data redundantly across multiple geographically separated Availability Zones within an Amazon Web Services Region, choose Regional.

      • To create a file system that stores data redundantly within a single Availability Zone in an Amazon Web Services Region, choose One Zone, and then select the Availability Zone.

        For more information, see EFS file system types.

        Note

        One Zone file systems are not available in all Availability Zones in the Amazon Web Services Regions where Amazon EFS is available.

    2. For Encryption, encryption of data at rest is automatically enabled on the destination file system. By default, EFS uses your Amazon Key Management Service (Amazon KMS) service key for Amazon EFS (aws/elasticfilesystem). To use a different KMS key, choose a KMS key or enter the ARN for an existing key.

      Important

      After the file system is created, you cannot change the KMS key.

  6. If you are replicating to an existing destination file system, choose Browse EFS, and then select the file system. The path to your destination file system appears in the Destination box.

    If replication overwrite protection is enabled on the file system, then a warning displays, prompting you to disable protection. To disable protection, choose Disable protection, and then turn off the Replication overwrite protection. After disabling the protection, click the Refresh button to clear the message.

  7. Choose Create replication. If you are replicating to a new file system, then a message displays, asking you to confirm the replication. Type confirm in the input box, and then click Create replication.

    The Replication section is displayed, showing the replication details. The Replication state value is initially Enabling, and Last synced is blank. After the state reads Enabled, Last synced shows Initial sync in progress.

  8. To see the destination file system's configuration information, choose the file system ID above Destination file system. The File system details page for the destination file system displays in a new browser tab (depending on your browser settings).

To create a replication configuration, use the create-replication-configuration CLI command. The equivalent API command is CreateReplicationConfiguration.

Example : Create a replication configuration for a Regional destination file system

The following example creates a replication configuration for the file system fs-0123456789abcdef1. This example uses the Region parameter to create a destination file system in the eu-west-2 Amazon Web Services Region. The KmsKeyId parameter specifies the KMS key ID to use when encrypting the destination file system.

aws efs create-replication-configuration \ --source-file-system-id fs-0123456789abcdef1 \ --destinations "[{\"Region\":\"eu-west-2\", \"KmsKeyId\":\"arn:aws:kms:us-east-2:111122223333:key\/abcd1234-ef56-ab78-cd90-1111abcd2222\"}]"

The Amazon CLI responds as follows:

{ "SourceFileSystemArn": "arn:aws:elasticfilesystem:us-east-1:111122223333:file-system/fs-0123456789abcdef1", "SourceFileSystemRegion": "us-east-1", "Destinations": [ { "Status": "ENABLING", "FileSystemId": "fs-0123456789abcde22", "Region": "eu-west-2" } ], "SourceFileSystemId": "fs-0123456789abcdef1", "CreationTime": 1641491892.0, "OriginalSourceFileSystemArn": "arn:aws:elasticfilesystem:us-east-1:111122223333:file-system/fs-0123456789abcdef1" }
Example : Create a replication configuration for a One Zone destination file system

The following example creates a replication configuration for the file system fs-0123456789abcdef1. This example uses the AvailabilityZoneName parameter to create a One Zone destination file system in the us-west-2a Availability Zone. Because no KMS key is specified, the destination file system is encrypted using the account's default Amazon KMS service key for Amazon EFS (aws/elasticfilesystem).

aws efs create-replication-configuration \ --source-file-system-id fs-0123456789abcdef1 \ --destinations AvailabilityZoneName=us-west-2a