Menu
Amazon Relational Database Service
API Reference (API Version 2014-10-31)

CopyDBClusterSnapshot

Copies a snapshot of a DB cluster.

To copy a DB cluster snapshot from a shared manual DB cluster snapshot, SourceDBClusterSnapshotIdentifier must be the Amazon Resource Name (ARN) of the shared DB cluster snapshot.

You can copy an encrypted DB cluster snapshot from another AWS Region. In that case, the AWS Region where you call the CopyDBClusterSnapshot action is the destination AWS Region for the encrypted DB cluster snapshot to be copied to. To copy an encrypted DB cluster snapshot from another AWS Region, you must provide the following values:

  • KmsKeyId - The AWS Key Management System (KMS) key identifier for the key to use to encrypt the copy of the DB cluster snapshot in the destination AWS Region.

  • PreSignedUrl - A URL that contains a Signature Version 4 signed request for the CopyDBClusterSnapshot action to be called in the source AWS Region where the DB cluster snapshot will be copied from. The pre-signed URL must be a valid request for the CopyDBClusterSnapshot API action that can be executed in the source AWS Region that contains the encrypted DB cluster snapshot to be copied.

    The pre-signed URL request must contain the following parameter values:

    • KmsKeyId - The KMS key identifier for the key to use to encrypt the copy of the DB cluster snapshot in the destination AWS Region. This is the same identifier for both the CopyDBClusterSnapshot action that is called in the destination AWS Region, and the action contained in the pre-signed URL.

    • DestinationRegion - The name of the AWS Region that the DB cluster snapshot will be created in.

    • SourceDBClusterSnapshotIdentifier - The DB cluster snapshot identifier for the encrypted DB cluster snapshot to be copied. This identifier must be in the Amazon Resource Name (ARN) format for the source AWS Region. For example, if you are copying an encrypted DB cluster snapshot from the us-west-2 region, then your SourceDBClusterSnapshotIdentifier looks like the following example: arn:aws:rds:us-west-2:123456789012:cluster-snapshot:aurora-cluster1-snapshot-20161115.

    To learn how to generate a Signature Version 4 signed request, see Authenticating Requests: Using Query Parameters (AWS Signature Version 4) and Signature Version 4 Signing Process.

  • TargetDBClusterSnapshotIdentifier - The identifier for the new copy of the DB cluster snapshot in the destination AWS Region.

  • SourceDBClusterSnapshotIdentifier - The DB cluster snapshot identifier for the encrypted DB cluster snapshot to be copied. This identifier must be in the ARN format for the source AWS Region and is the same value as the SourceDBClusterSnapshotIdentifier in the pre-signed URL.

To cancel the copy operation once it is in progress, delete the target DB cluster snapshot identified by TargetDBClusterSnapshotIdentifier while that DB cluster snapshot is in "copying" status.

For more information on copying encrypted DB cluster snapshots from one AWS Region to another, see Copying a DB Cluster Snapshot in the Same Account, Either in the Same Region or Across Regions in the Amazon RDS User Guide.

For more information on Amazon Aurora, see Aurora on Amazon RDS in the Amazon RDS User Guide.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

CopyTags

True to copy all tags from the source DB cluster snapshot to the target DB cluster snapshot; otherwise false. The default is false.

Type: Boolean

Required: No

KmsKeyId

The AWS KMS key ID for an encrypted DB cluster snapshot. The KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS encryption key.

If you copy an unencrypted DB cluster snapshot and specify a value for the KmsKeyId parameter, Amazon RDS encrypts the target DB cluster snapshot using the specified KMS encryption key.

If you copy an encrypted DB cluster snapshot from your AWS account, you can specify a value for KmsKeyId to encrypt the copy with a new KMS encryption key. If you don't specify a value for KmsKeyId, then the copy of the DB cluster snapshot is encrypted with the same KMS key as the source DB cluster snapshot.

If you copy an encrypted DB cluster snapshot that is shared from another AWS account, then you must specify a value for KmsKeyId.

To copy an encrypted DB cluster snapshot to another AWS Region, you must set KmsKeyId to the KMS key ID you want to use to encrypt the copy of the DB cluster snapshot in the destination AWS Region. KMS encryption keys are specific to the AWS Region that they are created in, and you cannot use encryption keys from one AWS Region in another AWS Region.

Type: String

Required: No

PreSignedUrl

The URL that contains a Signature Version 4 signed request for the CopyDBClusterSnapshot API action in the AWS Region that contains the source DB cluster snapshot to copy. The PreSignedUrl parameter must be used when copying an encrypted DB cluster snapshot from another AWS Region.

The pre-signed URL must be a valid request for the CopyDBSClusterSnapshot API action that can be executed in the source AWS Region that contains the encrypted DB cluster snapshot to be copied. The pre-signed URL request must contain the following parameter values:

  • KmsKeyId - The KMS key identifier for the key to use to encrypt the copy of the DB cluster snapshot in the destination AWS Region. This is the same identifier for both the CopyDBClusterSnapshot action that is called in the destination AWS Region, and the action contained in the pre-signed URL.

  • DestinationRegion - The name of the AWS Region that the DB cluster snapshot will be created in.

  • SourceDBClusterSnapshotIdentifier - The DB cluster snapshot identifier for the encrypted DB cluster snapshot to be copied. This identifier must be in the Amazon Resource Name (ARN) format for the source AWS Region. For example, if you are copying an encrypted DB cluster snapshot from the us-west-2 region, then your SourceDBClusterSnapshotIdentifier looks like the following example: arn:aws:rds:us-west-2:123456789012:cluster-snapshot:aurora-cluster1-snapshot-20161115.

To learn how to generate a Signature Version 4 signed request, see Authenticating Requests: Using Query Parameters (AWS Signature Version 4) and Signature Version 4 Signing Process.

Type: String

Required: No

SourceDBClusterSnapshotIdentifier

The identifier of the DB cluster snapshot to copy. This parameter is not case-sensitive.

You cannot copy an encrypted, shared DB cluster snapshot from one AWS Region to another.

Constraints:

  • Must specify a valid system snapshot in the "available" state.

  • If the source snapshot is in the same AWS Region as the copy, specify a valid DB snapshot identifier.

  • If the source snapshot is in a different AWS Region than the copy, specify a valid DB cluster snapshot ARN. For more information, go to Copying a DB Snapshot or DB Cluster Snapshot.

Example: my-cluster-snapshot1

Type: String

Required: Yes

Tags.Tag.N

A list of tags.

Type: Array of Tag objects

Required: No

TargetDBClusterSnapshotIdentifier

The identifier of the new DB cluster snapshot to create from the source DB cluster snapshot. This parameter is not case-sensitive.

Constraints:

  • Must contain from 1 to 63 letters, numbers, or hyphens.

  • First character must be a letter.

  • Cannot end with a hyphen or contain two consecutive hyphens.

Example: my-cluster-snapshot2

Type: String

Required: Yes

Response Elements

The following element is returned by the service.

DBClusterSnapshot

Contains the result of a successful invocation of the following actions:

This data type is used as a response element in the DescribeDBClusterSnapshots action.

Type: DBClusterSnapshot object

Errors

For information about the errors that are common to all actions, see Common Errors.

DBClusterSnapshotAlreadyExistsFault

User already has a DB cluster snapshot with the given identifier.

HTTP Status Code: 400

DBClusterSnapshotNotFoundFault

DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot.

HTTP Status Code: 404

InvalidDBClusterSnapshotStateFault

The supplied value is not a valid DB cluster snapshot state.

HTTP Status Code: 400

InvalidDBClusterStateFault

The DB cluster is not in a valid state.

HTTP Status Code: 400

KMSKeyNotAccessibleFault

Error accessing KMS key.

HTTP Status Code: 400

SnapshotQuotaExceeded

Request would result in user exceeding the allowed number of DB snapshots.

HTTP Status Code: 400

Example

Sample Request

https://rds.us-west-2.amazonaws.com/
    ?Action=CopyDBClusterSnapshot
    &SignatureMethod=HmacSHA256
    &SignatureVersion=4
    &SourceDBClusterSnapshotIdentifier=rds%3Asample-cluster-2016-09-14-10-38
    &TargetDBClusterSnapshotIdentifier=cluster-snapshot-copy-1
    &Version=2014-10-31
    &X-Amz-Algorithm=AWS4-HMAC-SHA256
    &X-Amz-Credential=AKIADQKE4SARGYLE/20160914/us-west-2/rds/aws4_request
    &X-Amz-Date=20160914T164919Z
    &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date
    &X-Amz-Signature=4503d6112f2ab5332d7d1871cba6b97ddcc9748d3d4da0cb2c219ace80cfd384

Sample Response

<CopyDBClusterSnapshotResponse xmlns="http://rds.amazonaws.com/doc/2014-10-31/">
  <CopyDBClusterSnapshotResult>
    <DBClusterSnapshot>
      <MasterUsername>mymasteruser</MasterUsername>
      <AllocatedStorage>1</AllocatedStorage>
      <SnapshotType>manual</SnapshotType>
      <AvailabilityZones>
        <AvailabilityZone>us-west-2a</AvailabilityZone>
        <AvailabilityZone>us-west-2b</AvailabilityZone>
        <AvailabilityZone>us-west-2c</AvailabilityZone>
      </AvailabilityZones>
      <StorageEncrypted>false</StorageEncrypted>
      <Engine>aurora</Engine>
      <Port>0</Port>
      <LicenseModel>aurora</LicenseModel>
      <SnapshotCreateTime>2016-09-14T10:38:05.616Z</SnapshotCreateTime>
      <PercentProgress>100</PercentProgress>
      <VpcId>vpc-e97e7d8d</VpcId>
      <DBClusterSnapshotIdentifier>cluster-snapshot-copy-1</DBClusterSnapshotIdentifier>
      <DBClusterSnapshotArn>arn:aws:rds:us-west-2:123456789012:cluster-snapshot:cluster-snapshot-copy-1</DBClusterSnapshotArn>
      <DBClusterIdentifier>sample-cluster</DBClusterIdentifier>
      <ClusterCreateTime>2016-09-13T16:57:52.695Z</ClusterCreateTime>
      <Status>available</Status>
    </DBClusterSnapshot>
  </CopyDBClusterSnapshotResult>
  <ResponseMetadata>
    <RequestId>2e861f29-7a9b-11e6-94c8-21ac69ee8f8c</RequestId>
  </ResponseMetadata>
</CopyDBClusterSnapshotResponse>

See Also

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