CreateReplicationConfiguration - Amazon Elastic File System

CreateReplicationConfiguration

Creates a replication configuration that replicates an existing EFS file system to a new, read-only file system. For more information, see Amazon EFS replication in the Amazon EFS User Guide. The replication configuration specifies the following:

  • Source file system – The EFS file system that you want replicated. The source file system cannot be a destination file system in an existing replication configuration.

  • AWS Region – The AWS Region in which the destination file system is created. Amazon EFS replication is available in all AWS Regions in which EFS is available. The Region must be enabled. For more information, see Managing AWS Regions in the AWS General Reference Reference Guide.

  • Destination file system configuration – The configuration of the destination file system to which the source file system will be replicated. There can only be one destination file system in a replication configuration.

    Parameters for the replication configuration include:

    • File system ID – The ID of the destination file system for the replication. If no ID is provided, then EFS creates a new file system with the default settings. For existing file systems, the file system's replication overwrite protection must be disabled. For more information, see Replicating to an existing file system.

    • Availability Zone – If you want the destination file system to use One Zone storage, you must specify the Availability Zone to create the file system in. For more information, see EFS file system types in the Amazon EFS User Guide.

    • Encryption – All destination file systems are created with encryption at rest enabled. You can specify the AWS Key Management Service (AWS KMS) key that is used to encrypt the destination file system. If you don't specify a KMS key, your service-managed KMS key for Amazon EFS is used.

      Note

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

For new destination file systems, the following properties are set by default:

  • Performance mode - The destination file system's performance mode matches that of the source file system, unless the destination file system uses EFS One Zone storage. In that case, the General Purpose performance mode is used. The performance mode cannot be changed.

  • Throughput mode - The destination file system's throughput mode matches that of the source file system. After the file system is created, you can modify the throughput mode.

  • lifecycle management – lifecycle management is not enabled on the destination file system. After the destination file system is created, you can enable lifecycle management.

  • Automatic backups – Automatic daily backups are enabled on the destination file system. After the file system is created, you can change this setting.

For more information, see Amazon EFS replication in the Amazon EFS User Guide.

Request Syntax

POST /2015-02-01/file-systems/SourceFileSystemId/replication-configuration HTTP/1.1 Content-type: application/json { "Destinations": [ { "AvailabilityZoneName": "string", "FileSystemId": "string", "KmsKeyId": "string", "Region": "string" } ] }

URI Request Parameters

The request uses the following URI parameters.

SourceFileSystemId

Specifies the Amazon EFS file system that you want to replicate. This file system cannot already be a source or destination file system in another replication configuration.

Length Constraints: Maximum length of 128.

Pattern: ^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$

Required: Yes

Request Body

The request accepts the following data in JSON format.

Destinations

An array of destination configuration objects. Only one destination configuration object is supported.

Type: Array of DestinationToCreate objects

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "CreationTime": number, "Destinations": [ { "FileSystemId": "string", "LastReplicatedTimestamp": number, "Region": "string", "Status": "string" } ], "OriginalSourceFileSystemArn": "string", "SourceFileSystemArn": "string", "SourceFileSystemId": "string", "SourceFileSystemRegion": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

CreationTime

Describes when the replication configuration was created.

Type: Timestamp

Destinations

An array of destination objects. Only one destination object is supported.

Type: Array of Destination objects

OriginalSourceFileSystemArn

The Amazon Resource Name (ARN) of the original source EFS file system in the replication configuration.

Type: String

SourceFileSystemArn

The Amazon Resource Name (ARN) of the current source file system in the replication configuration.

Type: String

SourceFileSystemId

The ID of the source Amazon EFS file system that is being replicated.

Type: String

Length Constraints: Maximum length of 128.

Pattern: ^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$

SourceFileSystemRegion

The AWS Region in which the source EFS file system is located.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-{0,1}[0-9]{0,1}$

Errors

BadRequest

Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.

HTTP Status Code: 400

ConflictException

Returned if the source file system in a replication is encrypted but the destination file system is unencrypted.

HTTP Status Code: 409

FileSystemLimitExceeded

Returned if the AWS account has already created the maximum number of file systems allowed per account.

HTTP Status Code: 403

FileSystemNotFound

Returned if the specified FileSystemId value doesn't exist in the requester's AWS account.

HTTP Status Code: 404

IncorrectFileSystemLifeCycleState

Returned if the file system's lifecycle state is not "available".

HTTP Status Code: 409

InsufficientThroughputCapacity

Returned if there's not enough capacity to provision additional throughput. This value might be returned when you try to create a file system in provisioned throughput mode, when you attempt to increase the provisioned throughput of an existing file system, or when you attempt to change an existing file system from Bursting Throughput to Provisioned Throughput mode. Try again later.

HTTP Status Code: 503

InternalServerError

Returned if an error occurred on the server side.

HTTP Status Code: 500

ReplicationNotFound

Returned if the specified file system does not have a replication configuration.

HTTP Status Code: 404

ThroughputLimitExceeded

Returned if the throughput mode or amount of provisioned throughput can't be changed because the throughput limit of 1024 MiB/s has been reached.

HTTP Status Code: 400

UnsupportedAvailabilityZone

Returned if the requested Amazon EFS functionality is not available in the specified Availability Zone.

HTTP Status Code: 400

ValidationException

Returned if the AWS Backup service is not available in the AWS Region in which the request was made.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: