CmdID / aws / aws secretsmanager
aws secretsmanager replicate-secret-to-regions
Replicates the secret to a new Regions. AWS CLI reference
1 example 3 options Its page in the AWS CLI reference
Examples
To replicate a secret to another region
The following replicate-secret-to-regions example replicates a secret to eu-west-3. The replica is encrypted with the AWS managed key aws/secretsmanager.
aws secretsmanager replicate-secret-to-regions --secret-id MyTestSecret --add-replica-regions Region=eu-west-3Identify--secret-idThe ARN or name of the secret to replicate.--add-replica-regionsA list of Regions in which to replicate the secret.Its output
{
"ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestSecret-1a2b3c",
"ReplicationStatus": [
{
"Region": "eu-west-3",
"KmsKeyId": "alias/aws/secretsmanager",
"Status": "InProgress"
}
]
}For more information, see Replicate a secret to another Region in the Secrets Manager User Guide.
Options
--add-replica-regionsA list of Regions in which to replicate the secret.--force-overwrite-replica-secretSpecifies whether to overwrite a secret with the same name in the destination Region.--secret-idThe ARN or name of the secret to replicate.